Пример #1
0
        static void Main(string[] args)
        {
            Board board = new Board();
            Console.WriteLine(board);
            Console.ReadKey();

            board.ResetPieces();

            board.Move("11", Piece.PLAYER1);
            board.Move("12", Piece.PLAYER1);
            board.Move("13", Piece.PLAYER2);
            board.Move("22", Piece.PLAYER2);

            Console.WriteLine("pieces: " + board.GetPieces());
            Console.ReadKey();

            board.ResetPieces();
            Console.WriteLine("pieces: " + board.GetPieces());
            Console.ReadKey();
        }
Пример #2
0
 private static void addPieceToBoard(string position, Piece player, Board board)
 {
     Console.WriteLine("string [" + position + "] (True): " + board.isValidMove(position).ToString());
     board.Move(position, player);
     Console.WriteLine("string [" + position + "] when occupied by a player (False): " + board.isValidMove(position).ToString());
 }