Example #1
0
        public bool ChooseCell(int cell)
        {
            bool replaced = false;

            if (Status.Equals(GameStatus.PlayerPlays))
            {
                char symbol = GetCurrentPlayer().GetSymbol();
                replaced = gameboard.ReplaceNumber(cell, symbol);

                if (replaced)
                {
                    if (gameboard.HasWon(symbol))
                    {
                        Status = GameStatus.PlayerWon;
                    }
                    else
                    {
                        playerList.GetNext();
                    }
                }
            }
            return(replaced);
        }