Example #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
Example #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)])
Example #3
0
def test_movement_creature_not_on_map(clean_map, player, path):
    other_owner_figure = Figure('Naruto', 'B')
    with pytest.raises(CreatureNotFound):
        movement(clean_map, player, other_owner_figure, path)
Example #4
0
def test_movement_creature_from_another_owner(clean_map, player, path):
    other_owner_figure = Figure('Naruto', 'A')
    with pytest.raises(ErrorCreatureOwner):
        movement(clean_map, player, other_owner_figure, path)