Tic Tac Toe Model
Copyright (c) 2019 Seán D. Murray SEE MIT LICENSE FILE
A logical model playing the tic-tac-toe (naughts & crosses, Xs & Os) game.
Usage
const TicTacToe = ;const ticTacToe = ; // Get whoes turn it is.ticTacToe; // Make a move.ticTacToe; // X playedticTacToe;// O playedticTacToe;// X played ticTacToe; // returns O // Is the game done?ticTacToe; // returns false. ticTacToe;// O playedticTacToe;// X playedticTacToe;// O played // Get the value at this coordinate.ticTacToevalue2 2;// returns O ticTacToe; // returns true. // Retrrns who the winner is.ticTacToe; // returns player O