Reputation:
I have this code:
for i in range(40):
print("execution:", i, end=" ")
if player_y - i >= 0:
if roomMap[player_y - i][player_x] == 1:
roomMap[player_y - i][player_x] = 3
The variables player_x
, player_y
and the list roomMap
are already defined, but it does nothing and I am unsure what's happening.
Upvotes: 0
Views: 1225
Reputation: 56
There are multiple reasons why your loop would not be running
Steps you can take to resolve that:
print("I am inside the loop")
see if you can print that in the console from inside the loop.Upvotes: 0