Arrow Keys?!?!

Pages: 12
closed account (EAUX92yv)
The code works perfectly fine and does what it should, but how do I change one individual circle of the maze? I wish to create interactive objects in the game. Thanks!

In the start of your code, after initialization, you already state where you started. Then, you can assign random, or specific, places in the maze with a different character. 'M' for monster, 'G' for gold, etc. If you find that after the player inputs a direction, and that places him at those coordinates, you could jump to a routine that lets him fight a creature, get the gold, falls into a trap, etc. You don't have to print these locations, either. Make an int array the same size as the maze. Populate that with the treasures, etc., instead of using the letters in the maze array. Check where the person is in the maze, what is located in the same array space, and act accordingly.
Last edited on
Topic archived. No new replies allowed.
Pages: 12