Exemplo n.º 1
0
# Arya should have a `greet` method that accepts another Character
# Return "Hello, Jon Snow, I am Arya Stark. I am awesome."
print(arya.greet(jon))

# Testing adding, viewing, and removing items to inventory
arya.add_inventory("food")
print(arya.view_inventory())
arya.remove_inventory("sword")
print(arya.view_inventory())

# Hero class
bronn = Hero("Bronn of the Blackwater", "bron.png")
print(bronn.name)

# Hero should be able to greet Character
print(bronn.greet(arya))
print(jon.greet(bronn))

# Monster class
walker = Monster("White Walker")
print(walker.name)

# Hero greets Monster
jon = Hero("Jon Snow", "jon.png")
print(jon.greet(walker))

# Should print "uuuggghhhh"
print(walker.greet())

print(walker.greet(jon))
Exemplo n.º 2
0
#arya should have a 'greet' method
#and when i call it with arya.greet(jon), it should return
#"Hello,Jon Snow, I am Arya Stark. I am awesome."
print(arya.greet(jon))

#arya should have a 'greet' method
#and when i call it with arya.greet(jon), it should return
#"Hello, I am Arya Stark. I am awesome."
print(arya.greet())

#I should be able to create a Hero Instance
bronn = Hero("Bronn of the Blackwater", "bronn.png")

#hero should be able to greet character
print(bronn.greet(arya))
print(jon.greet(bronn))
print(arya.greet(bronn))

#remember to import the 'Monster' subclass from 'character.py' 
#otherwise, you get an error message!

dragon = Monster()

print(dragon.greet())

print(dragon.greet(jon))

print(bronn.greet(dragon))
print(bronn.greet(jon))
Exemplo n.º 3
0
# arya should have a 'greet' method
# and when I call with 'arya.greet(jon)', it should return
# "Hello, Jon Snow, I am Arya Stark. I am awesome."
print(arya.greet(jon))

# arya should have a 'greet' method
# and when I call with 'arya.greet()', it should return
# "Hello, I am Arya Stark. I am awesome."
print(arya.greet())

# I should be able to create a Hero instance
bronn = Hero("Bronn of the Blackwater", "bron.png")

# Hero should be able to greet Character
print(bronn.greet(arya))
print(jon.greet(bronn))

# I should be able to create a Monster instance
pinky = Monster()

# Monster should be able to greet Hero
print(pinky.greet(bronn))
print(bronn.greet(pinky))

# Expect Bronn to say "EEEEEEEK!"
# when encountering a monster
print(bronn.greet(pinky))
print(bronn.greet(jon))

print("###########")
Exemplo n.º 4
0
# arya should have a `greet` method
# and when I call with `arya.greet(jon)`, it should return
# "Hello Jon Snow, I am Arya Stark. I am awesome"
print(arya.greet(jon))

# arya should have a `greet` method
# and when I call with `arya.greet()`, it should return
# "Hello, I am Arya Stark. I am awesome"
print(arya.greet())

# I should be able to create a hero instance
bronn = Hero("Bronn of the Blackwater", "bronn.png")

# Hero should be able to greet Character
print(bronn.greet(arya))
print(jon.greet(bronn))

# should be able to create a monster instance
walker = Monster()

# Monster and Hero should be able to greet eachother
print(walker.greet(bronn))
print(bronn.greet(walker))

# Monster should be able to growl at nothing or at someone
print(walker.rawr())
print(walker.rawr(jon))

# expect Jon to say eek when encountering Monster
print(bronn.greet(walker))
Exemplo n.º 5
0
# Arya should have a `greet` method
# when i call it with `Arya.greet()`, it should return
# "Hello, I am Arya Stark. I am awesome."
print(Arya.greet())

# Arya should have a `greet` method
# when i call it with `Arya.greet(Jon)`, it should return
# "Hello, Jon Snow, I am Arya Stark. I am awesome."
print(Arya.greet(Jon))

# I should be able to create a hero instance
Bronn = Hero("Bronn of the Blackwater", "bron.png")

# Hero should be able to greet Character
print(Bronn.greet(Arya))
print(Jon.greet(Bronn))
print(Arya.greet(Bronn))

#I should be able to create a Monster instance
White_walker = Monster()

#When I print white_walker.name and white_walker.avatar the name and avatar will be returned
# print(White_walker.name, White_walker.avatar)

# When I call White_walker.greet() it will return
# "Grr, Im a monster"
print(White_walker.greet())

# If a Hero meets a Monster they freak out
print(Bronn.greet(White_walker))
Exemplo n.º 6
0
arya.inventory.append('mask')

print(len(arya.inventory))

# arya should have a `greet` method
# and when I call with `arya.greet(jon)`, it should return
# "Hello, Jon Snow, I am Ayra Stark. I am awesome."
# print(arya.greet(jon))

# arya should have a `greet` method
# and when I call with `arya.greet()`, it should return
# "Hello, I am Ayra Stark. I am awesome."
# print(arya.greet())

# I should be able to create a hero instance
bronn = Hero("Bronn of the Blackwater", "bronn.png")

# Hero should be able to greet Character
# print(bronn.greet(arya))
# print(jon.greet(bronn))

# I should be able to create a monster instance
walker = Monster()

# Expect Monster to make monster sound
print(walker.greet(jon))

# Expect Hero to say "EEEEEEEEEK!"
# when encountering a monster
print(bronn.greet(walker))
Exemplo n.º 7
0
# Arya should have a `greet` method
# and when I call it with `arya.greet(jon)`, it should return ""Hello, Jon Snow. I am Arya Stark. I am awesome""

print(arya.greet(jon))

# Arya should have a `greet` method
# and when I call it with `arya.greet()`, it should return ""Hello. I am Arya Stark. I am awesome""

print(arya.greet())

# I should be able to create a `Hero` instance
bronn = Hero("Bronn of the Blackwater", "bron.png")

# Hero should be able to .greet a Character
print(bronn.greet(arya))
print(jon.greet(bronn))

# I should be able to create  `Monster` instance
night_king = Monster("Night King", "night_king.png")

# Monster should be able to .greet a Character
print(bronn.greet(night_king))
print(night_king.greet(arya))

print(night_king.monster_greet(jon))

# Expect Jon to say "EEEEEEEEEK!"
# when encountering a monster
print(bronn.greet(night_king))
Exemplo n.º 8
0
print(len(arya.inventory))

# arya should have a `greet` method
# and when I call it with arya.greet(jon) should return
# "Hello ,Jon Snow,I am Arya Stark, I am awesome"

print(arya.greet(jon))

# arya should have a `greet` method
# and when I call it with arya.greet() should return
# "Hello I am Arya Stark, I am awesome"

print(arya.greet())
# I should be able to create a Hero instance
bronn = Hero("Bronn of the Blackwater", "bron.png")
# I should be able to create a Monster
nking = Monster("The Night King", "nking.png")

print(bronn.greet(arya))

print(jon.greet(bronn))

# Monster should greet Hero in weird way
print(nking.greet_hero(bronn))
# Monster should be able to make monster sounds
print(nking.make_monster_sounds())

# Hero should freak out when greeting Monster
print(bronn.greet(nking))
print(bronn.greet(jon))