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 you will implement a much smaller game for this assignment. A simpler version that is closer to what you should implement is available here, though your version will use input and output through the console rather than graphics.

You will work in groups of 2 or 3 on this assignment. You will design your own variant on the game and then implement that in C++. Variants could include such ideas as hunting moldy food in the fridge, escaping from a cockroach in a garbage bin, or capturing Roscoe Raider in the science building. In addition to having a different setting, you must design your own traps and weapons. Part of your grade on the assignment will be based on your creativity.

When you are finished, you must have a game that interacts through the console. For example, if you implemented a story based on pirates, your program might have a dialog like

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

 You smell stew. You hear a belch.
 Action: N)orth, S)outh, E)ast, W)est, shoot C)annon, H)elp, Q)uit: s

 You find an cannon ball. You hear a belch.
 Action: N)orth, S)outh, E)ast, W)est, shoot C)annon, H)elp, Q)uit: n

 You smell stew. You hear a belch.
 Action: N)orth, S)outh, E)ast, W)est, shoot C)annon, 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 C)annon, H)elp, Q)uit: e

 You smell gunpowder. You hear a belch.
 Action: N)orth, S)outh, E)ast, W)est, shoot C)annon, H)elp, Q)uit: s

 You were shot!

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:

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.

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) 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. Double-check that your instructor has access to your repository.
  6. 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 do not include code windows or lots of blank space in the screen shots).
  7. 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.
  8. At the top of this PDF, list the assignment name and the names of all group members.
  9. Submit sample-run.pdf to Canvas to signal that you are finished.
  10. 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