I'm making a text-based game and I'd like the player to be able to move around the map, so I am using pygame to let the player use arrow keys to move but the arrow keys don't work.
def dungeon_001():
os.system("cls")
print()
print("|---0---- ------|")
print("| 웃 |")
print("| |")
print("| S |")
print("| |")
print("|-------------------|")
keys = pygame.key.get_pressed()
while True:
if keys[pygame.K_RIGHT]:
dungeon_005()
if keys[pygame.K_DOWN]:
dungeon_002()
dungeon_002()
and dungeon_005()
have already been defined.
Any help would be greatly appreciated!