Lab9: Gameboards with 2D arrays
Contents
Instructions
This lab will give you experience with 2D arrays and working with a game board (with obstacles) where the user can move around.
Now create a new C++ file called lab9.cpp. Copy the following
code into it and complete each of the places where TODO
appears.
Extra credit (1pts)
Initialize the player, enemies, treasure, and goal to random, but valid, spots on the game board.
Extra credit (1pts)
Provide the player with different difficulty levels; higher difficulty levels should have more enemies.
Extra credit (2pts)
Make it so that the enemies close in on the player on ever move. Note that they should always go toward where the player has just moved to, not where the player just was. So if the player moves to the left one space, the enemies should all move one block closer to the new spot the player occupies to the left.
(Back to top)Submission
Submit your .cpp file to here. You can view the rubric here.
(Back to top)