This board game was the final project assigned in my C++ programming class and heavily relied on using classes to control objects in the “cave” and be able to allow the user to interact with said objects. The purpose of the game is to either move around the cave and find the gold and safely escape or take out the Wumpus with bow and arrow. The game will give you clues when you are nearby enemies or you can play the game with the ability to see all objects on the map.
This was accomplished using classes and a hierarchy to determine the player’s proximity to events. Most of the functions required to run the game are a part of the game class and the hazards on the board inherit from the event class. This allows for efficient code that handles nearby events in a routine way. The board is a dynamic 2D array and every square has the opportunity to hold an event object, with these objects being the Wumpus, gold, stalactites or bats.
This program was one of my first projects with many different c files for each object. This project helped me learn how to efficiently manage many files in a program (makefiles!) and some of the benefits like not overloading the main program and increasing readability. This program took a lot of time to brainstorm and troubleshoot issues with the gameplay, however, it was very fun and rewarding as I have my own game I can play.