Exemple #1
0
        private TicTacToeCell ReadAvailableMoveFromInput(string inputLine)
        {
            var inputs = inputLine.Split(' ');
            int row    = int.Parse(inputs[0]);
            int col    = int.Parse(inputs[1]);

            var c = new TicTacToeCell()
            {
                Row = row,
                Col = col,
            };

            c.Normalize();
            return(c);
        }
Exemple #2
0
        //BOARD READING
        private TicTacToeCell ReadOpponentMove(string inputLine)
        {
            var inputs = inputLine.Split(' ');
            int row    = int.Parse(inputs[0]);
            int col    = int.Parse(inputs[1]);

            var c = new TicTacToeCell()
            {
                Row             = row,
                Col             = col,
                OwnedByPlayerID = TicTacToeCell.EnemyID,
            };

            c.Normalize();
            return(c);
        }