class Player:
def __init__(self):
self.inventory = [items.RedBloodCell()]
self.hp = 100
self.location_x, self.location_y = world.starting_position
self.vicory = false
def is_alive(self):
return self.hp > 0
def print_inventory(self):
for item in self.inventory:
def move(self, dx, dy):
self.location_x += dx
self.location_y += dy
print(world.tile_exists(self.location_x, self.location_y).intro_text())IndentationError: expected an indented block on Line 14
IndentationError: expected an indented block
|
IndentationError: expected an indented block
|
|
Sep-27-2019, 06:09 PM
you have for loop on line 12, but there is no loop body.
def print_inventory(self):
for item in self.inventory:
print(item) # this is just an example, you need to do something in the loop body
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link Create MCV example Debug small programs
Sep-27-2019, 06:59 PM
If you are not yet ready to write the code for printing the inventory you can always put pass on line 13.
|
|
|
Users browsing this thread: 1 Guest(s)
