10 ♦Syntax for 2d-arrays of objects?39

Warm ups:

  • Write the syntax pattern for accessing a 2D array cell using an instance of Location
  • Write the syntax pattern for extracting the dimensions of a 2D array.

Writing Challenge: Add nextRoom() to Dungeon to move the player to a random room (hint use RandomFactory), a method to return the Room the player is in, and a method to print the monsters in that room. When a player moves to a new room, it should replace the first monster in the room.