public bool CheckMove(char player, TTTCoord coord) { if (Turn != default && player != Turn) { return(false); } return(Board[coord.X, coord.Y] == default); }
public TTTModel PlayMove(char player, TTTCoord coord) { if (Board[coord.X, coord.Y] == default) { Board[coord.X, coord.Y] = player; Turn = OppositePlayer(player); return(new TTTModel { Player = player, MovesLeft = --MovesLeft, Move = coord, Board = BoardAsDoubleArray, Winnner = this.MovesLeft < 5 ? CheckBoard() : default });