示例#1
0
文件: test_rook.py 项目: rom1ch/chess
def test_cant_move_with_obstacles():
    board = Board()
    rook = Rook(7, 0, Color.BLACK, board)
    assert not rook.can_move(4, 0)
示例#2
0
文件: test_rook.py 项目: rom1ch/chess
def test_can_move():
    board = Board()
    rook = Rook(4, 4, Color.WHITE, board)
    assert rook.can_move(4, 6)
示例#3
0
文件: test_rook.py 项目: rom1ch/chess
def test_cant_move_diagonal():
    board = Board()
    rook = Rook(0, 0, Color.WHITE, board)
    assert not rook.can_move(1, 1)