Exemplo n.º 1
0
def test_long_form_move_formats():
    starting_fen = 'rnbqkbnr/pppppppr/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1'
    board = BitBoardState.from_fen(starting_fen)
    mv = Move.from_long_form(True, 'e2-e4')
    assert_equal(mv.to_long_form(), 'e2-e4')
    board.make_move(mv)
    assert_equal(
        board.to_fen(),
        'rnbqkbnr/pppppppr/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 0 1')
Exemplo n.º 2
0
 def update(self, move):
     print(move)
     print(Move.from_long_form(self.board.whites_turn, move))
     print(Move.from_long_form(self.board.whites_turn, move).to_long_form())
     self.board.make_move(Move.from_long_form(self.board.whites_turn, move))