thealexhoar / HuntTheWumpus

One of the STEM High School Hunt the Wumpus groups.
GNU General Public License v2.0
1 stars 0 forks source link

Map? #2

Open detectivecalcite opened 10 years ago

detectivecalcite commented 10 years ago

Initially I was going to use a separate Map class to manage/track where room features (wumpus, player, pits, bats) occur in the cave. This class would've contained a reference to its corresponding Cave object. However, each room of the cave also needs to know if it contains a feature and which feature it contains (to enable game control and user interface to communicate directly with a room object). This means having to track room features in both the Room and Map classes. The way I'm planning on taking care of this is by doing away with Map entirely and just having room-feature booleans in each room, and public references to the rooms that contain features (e.g. "public static Room locationWumpus;") in Cave. Does this sound good?