Question: I need help this quesiton. Objective: Allow the player to navigate the dungeon of Javania by using commands such as walk N or WALK NORTH

I need help this quesiton.

Objective: Allow the player to navigate the dungeon of Javania by using commands such as "walk N" or "WALK NORTH" (without the quotes). Let's assume that you can only move North, South, East, and West. Additionally, if the player attempts to walk in a direction that is not valid, the player should be given a stern, "You cannot go that way!" or something to that effect. Finally, if the player enters "exit", the game should end with a snide comment. The map for the dungeon is in the comments. The array is set up as location[x][y]. Think of walking North or South as changing currentX and walking East or West as changing currentY. Imposing boundaries should be easy; don't let currentX or currentY go beyond the limits of the array.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!