Beispiel #1
0
def test_add_enemy():
    a=Room('test','Nothing to see here')
    b=Room('NO!','Just No')
    a.add_paths({"no": b})
    a.add_enemy("there is a testenemy here")
    c=a.description
    assert_equal(c,"""Nothing to see here\nthere is a testenemy here""")
    assert_equal(a.go(b),"can't go there")
Beispiel #2
0
def test_Enemy():
    a=Room('test','no')
    a.add_enemy("testenemy")
    assert_equal(a.enemy.health,100)
    a.enemy.attack()
    assert(a.enemy.health<100)