예제 #1
0
def test_that_player_cannot_move_west_through_the_level_boundary(p1, tiny_room):
    level = tiny_room.enter(p1, "exit")
    assert level.can_go_west(p1)
    p1.travel("w")
    assert not level.can_go_west(p1)
예제 #2
0
def test_that_player_cannot_move_north_through_the_level_boundary(p1, tiny_room):
    level = tiny_room.enter(p1, "entrance")
    assert level.can_go_north(p1)
    p1.travel("n")
    assert not level.can_go_north(p1)
예제 #3
0
def test_that_level_with_room_description_has_text(p1, tiny_room):
    level = tiny_room.enter(p1, "entrance")
    assert "tiniest of halls" in tiny_room.description
예제 #4
0
def test_that_level_with_exit_description_has_text(p1, tiny_room):
    level = tiny_room.enter(p1, "entrance")
    assert "harrowed and tiny halls of doom" in tiny_room.exit_text
예제 #5
0
def test_that_level_has_a_name(p1, tiny_room):
    level = tiny_room.enter(p1, "entrance")
    assert "tiny room" == tiny_room.name