コード例 #1
0
ファイル: Player.cs プロジェクト: mikec-git/Tic-Tac-Toe-Game
        public Tuple <int, int> PlayerMove(Board board)
        {
            do
            {
                Console.WriteLine("Enter board position: ");
                string squareNumString = Console.ReadLine();
                squareNum = Convert.ToInt32(squareNumString);
                if (squareNum < 1 || squareNum > 9)
                {
                    Console.WriteLine("That is an incorrect input, try again.");
                }
            } while (squareNum < 1 || squareNum > 9);

            var position = board.BoardPosition(squareNum);

            return(position);    // item 1 = rows, item 2 = columns
        }