Exemple #1
0
        public Position MoveRobot()
        {
            IPlayer currentPlayer = SearchByIndex(Steps % players.Count);

            if (currentPlayer.IsComputer)
            {
                int aiJPos = 0;
                int aiIPos = 0;
                GameLogic.AI(grid, currentPlayer.Mark, ref aiIPos, ref aiJPos, players.Count);
                currentPlayer.MakeMove(grid, new Position(aiIPos, aiJPos));
                Steps++;
                LastMark = currentPlayer.Mark;
                return(new Position(aiIPos, aiJPos));
            }
            else
            {
                return(null);
            }
        }