(myAction)
| 377 | |
| 378 | # Player Movement |
| 379 | def player_move(myAction): |
| 380 | dest = input("\nWhere would you like to move? 🚶\n> ") |
| 381 | |
| 382 | if dest in "UP": |
| 383 | destination = ZONE_MAP[player.location]["UP"] |
| 384 | |
| 385 | movement_handler(destination) |
| 386 | |
| 387 | elif dest in "DOWN": |
| 388 | destination = ZONE_MAP[player.location]["DOWN"] |
| 389 | |
| 390 | movement_handler(destination) |
| 391 | |
| 392 | elif dest in "LEFT": |
| 393 | destination = ZONE_MAP[player.location]["LEFT"] |
| 394 | |
| 395 | movement_handler(destination) |
| 396 | |
| 397 | elif dest in "RIGHT": |
| 398 | destination = ZONE_MAP[player.location]["RIGHT"] |
| 399 | |
| 400 | movement_handler(destination) |
| 401 | |
| 402 | else: |
| 403 | print("\nI don't understand that command.\nPlease enter a valid command. ⚠️\n") |
| 404 | player_move(myAction) |
| 405 | |
| 406 | |
| 407 | # Player Location |
no test coverage detected