CSC 2210, SPA 4:
Wumpus Hunt

Overview

This assignment will give you experience with working in teams to write a larger, object-oriented C++ program involving pointers and inheritance. It is in two parts:

Hunt the Wumpus was an early computer game. The basic goal of the game is to kill a wumpus in a cave without entering the chamber the wumpus is in, using your senses to detect when it is close by. Along the way you can fall into pits, be picked up by bats, and discover objects such as arrows and treasure. Atari had a full version of this that you can play online, but this has far more features than we want you to try to implement. A simpler version that is closer to what you should implement is available here. However, your solution must be character based. For example, your program might look like

    
 Action: N)orth, S)outh, E)ast, W)est, shoot A)rrow, H)elp, Q)uit: e

 You hear flapping. You smell something bad.
 Action: N)orth, S)outh, E)ast, W)est, shoot A)rrow, H)elp, Q)uit: s

 You find an arrow. You smell something bad.
 Action: N)orth, S)outh, E)ast, W)est, shoot A)rrow, H)elp, Q)uit: n

 You hear flapping. You smell something bad.
 Action: N)orth, S)outh, E)ast, W)est, shoot A)rrow, H)elp, Q)uit: n

 You are in a maze of twisty passages, all alike.
 Action: N)orth, S)outh, E)ast, W)est, shoot A)rrow, H)elp, Q)uit: e

 You feel a breeze. You smell something bad.
 Action: N)orth, S)outh, E)ast, W)est, shoot A)rrow, H)elp, Q)uit: s

 You were eaten by a wumpus!

You will work in groups of 2 or 3 on this assignment. You will design your own version of the game and implement it in C++. One of your early tasks will be to document the rules of your game and to construct a class model. Part of your grade will be based on how unique your solution is; you might hunt moldy food in your fridge, chase Roscoe Raider through the science building, or be hunted by a large cockroach. Be creative with behaviors as well: alternative traps and new ways to move about the caves are also appropriate. Note that just substituting (say) marshmallows for arrows is not an example of creativity.

The Game

Design Constraints

Hints

Part A

This project is broken into two parts. The first is about specifying the problem, the second about completing the implementation.

For part A, submit a (single) PDF containing all of the following

In addition, check in an initial version of the project that builds on all machines. This should print the primary menu, print the help text when the user enters 'h', generate the collection of rooms and print the map of the rooms when the user enters 'm', and exits when the user enters 'q'. Also write preliminary versions of all class definitions (just the interfaces, not the implementations).

Some students are tempted use use the code generation feature of Enterprise Architect to create the initial code. Do not; it adds a lot of unnecessary artifacts and means you will not get sufficient practice writing C++ code. If it takes more than a couple hours to create an initial version of the project, get help from your instructor. It should be as simple as creating a "hello world" program and editing it to prompt the user until the user enters 'q'.

Part B

Part B is finishing and delivering the full solution. This includes the following:

  1. Have a friend play the game and confirm it is winnable with minimal help from you.
  2. Ensure all code meets the published coding standard and has been pushed. All source (.h, .cpp files) must be in a folder called src in the top level of your repository.
    • Remember that the standard mandates lower case filenames.
    • There should not be any subdirectories in src. Multi-folder C++ projects do not make sense for the small projects you create in academics.
    • You must have fewer files than classes to ensure you understand that one file per class is not a requirement in C++.
    • The submitted code must be on the main branch. You are discouraged from using branches for short assignments such as this.
    • The 15-line length limit does not apply in this assignment.
  3. Ensure the project build files have been checked in to your repository.
  4. In the top level of your repository, create a file README.TXT (or README.md, etc.) which gives the names of all people on your team and build directions that indicate the version of C++ you used, the build tool you used, the steps someone goes through to use that tool to build an executable, and where the executable can be found once it is built. Anyone who knows C++ and has your build system installed should be able to reproduce those steps.
    • Document how to enter debug mode in the game.
    • Include any changes to your game (from your stated design) in this document.
    • Use the output of g++ --version to determine the version of the tool used to build the system. It is very helpful to be able to identify this when trying to get a system to build years after it was written.
  5. Capture a sample run of your program showing that it works. You do not have to capture every movement, but it should be clear how the player won the game through the moves they made and hints they got. This will likely use debug output to show what is happening. Be sure each screen shot is readable with a minimal amount of additional information. (In particular, you don't want to include code windows or lots of blank space in the screen shots).
  6. In addition to your screenshots, use these directions to create a reverse-engineered (UML) class diagram of your system, export it as a .png, and include that image in sample-run.pdf. Note only one student needs to construct this diagram.
  7. At the top of this PDF, list the assignment name and the names of all group members.
  8. Submit sample-run.pdf to Canvas to signal that you are finished.
  9. See the submission requirements on Canvas. You may need to demonstrate your solution to your instructor, but this depends on how your instructor grades the assignment.

Common Issues