from vampire import Vampire

dracula = Vampire.create('Dracula', 122)  #Alive
nosferatu = Vampire.create('Nosferatu', 97)
blade = Vampire.create('Blade', 90)  #Alive
barnabas = Vampire.create('Barnabas Collins', 175)
von_count = Vampire.create('Count von Count', 1832652)  #Alive
print()

# Vampire.list_all_vampires()
print()

Vampire.sunset()

print(dracula.drink_blood())
print(dracula.go_home())

print(nosferatu.go_home())

print(barnabas.go_home())

print(von_count.drink_blood())

Vampire.sunrise()
print()

Vampire.list_all_vampires()
Exemple #2
0
from vampire import Vampire

# test out the class
dracula = Vampire.create("Dracula", 600)
deacon = Vampire.create("Deacon", 150)
balthazar = Vampire.create("Balthazar", 250)
anton = Vampire.create("Anton", 25)
# send everyone home first
for vampire in Vampire.coven:
    vampire.go_home()
# see the result
print("Before sunset:")
for vampire in Vampire.coven:
    print(
        "*", "Name: {}\t In Coffin: {}\t Drank Blood Today: {}".format(
            vampire.name, vampire.in_coffin, vampire.drank_blood_today))
# let the night begin
Vampire.sunset()
print()
print("After sunset:")
# check the difference
for vampire in Vampire.coven:
    print(
        "*", "Name: {}\t In Coffin: {}\t Drank Blood Today: {}".format(
            vampire.name, vampire.in_coffin, vampire.drank_blood_today))
dracula.drink_blood()
dracula.go_home()
deacon.drink_blood()
deacon.go_home()
print()
print("When the night is over:")