示例#1
0
def test_movement(clean_map, player, figure, path):
    clean_map.put_piece(figure, (1, 1))
    expected = {
        'map': [[1, 2], [1, 3]],
        'creature': [1, 1]
    }
    response = movement(clean_map, player, figure, path)
    assert response == expected
示例#2
0
def test_movement_not_broken_path(clean_map, figure, player, path):
    clean_map.put_piece(figure, (1, 1))
    with pytest.raises(InvalidParameter):
        movement(clean_map, player, figure, [(1, 1), (1, 4)])