예제 #1
0
def player():
    new_map = toolkit.test_map()
    return new_map.player
예제 #2
0
def test_map():
    return toolkit.test_map()
예제 #3
0
def test_blocking_entity(test_player):
    testmap = toolkit.test_map()
    testmap.place(test_player, 1, 2)
    # Blocked by a wall, not an entity
    a = ActionWithDirection(entity=test_player, dx=0, dy=-1)
    assert not a.blocking_entity
예제 #4
0
def test_target_actor(test_player):
    testmap = toolkit.test_map()
    testmap.place(test_player, 2, 4)
    a = ActionWithDirection(entity=test_player, dx=0, dy=1)
    assert a.target_actor.name == "grid bug"
예제 #5
0
def player():
    m = toolkit.test_map()
    player = m.player
    dagger = player.inventory.item_dict.get('a')
    assert player.equipment.toggle_equip(dagger)
    return player