Comp 101 Lab5: A basic text game:
getting rid of the scare quotes
Due at noon on Wednesday Nov 21. (before you leave for your assignment free thanksgiving break.
In this straightforward lab, you will take the skeleton program that
you made last time and add repetition to make a more complete story.
- work with loops
- Extend existing code in new ways to appreciate the necessity of comments and design in code maintanance.
use your existing lab4 as a base (if you completely messed up lab4 send
me mail in the next couple of days and I can send you a lab4, though
you will then be stuck with my story arc.
Make Story loop just that: a loop.
This is a lab that requires less new thinking, but a lot more typeing
than recent labs. give yourself time to do this lab, you'll spend an
hour or two just typing in your story parts.
- You should loop through a getinput-check-printOutput loop untill
the story ends. (use an infinite loop and then when an ending state is
reached, use a break to leave the loop.)
- You should have at least one path through the story that will result in you having at least 8 interactions with the user
- the other paths through the story should have at least four interactions.
- When the story is over, exit the program.
- the _whichRoom instance variable in the Story class can and
should be used to keep track of where your user is in the story. It
might have been better named _whatState since at least one of you is
doing an outdoor sports game. You can change that name if you like.
- Use the player's character name at least once in the story.
When you submit this time, add a readme.txt file to your lab4 (you can
keep working in the lab4 folder even though this is lab5) folder
that you are building. The
readme should contain:
Once you have the readme done, cd into your parent folder, zip up the
entire lab4 folder using the -r flag as you have learned in the last
few labs, and use the online submission program to submit it to me. Even though you are zipping the lab4 folder, make sure you name it with lab5 or project5 in the title of your zip file. And remember to include your last name in the title of your zip file.
- Your name.
- A very brief summary of what you did, including any new methods you added and why you chose to implement things the way you did.
- A quick summary of your game/story and what I should expect it to say.
- Directions on how to run your program and anything unusual that I need to do to get it working properly.
- A list of any problems still in your code or anything that you didn't get done.
- the _whichRoom