GAD235: Revisiting Critter Caretaker

Here is an update of what you should have as your starting point for the Critter project in 2D Scripting. If you have a Critter from before, you may want to save it into a new file now with some stuff removed (for now). If you have no Critter, here's what you should make.

Base Class: Critter

  • Has the following needs as protected member ints (0-100, think percentages): food, entertainment, sleep
  • Has the following behaviours:
    • eat() - eats something, and gains some food points.
    • sleep() - the critter sleeps, regaining some sleep points.
    • play() - the critter does something entertaining, regaining some entertainment points.
    • passTime() - this should be called automatically after every "turn". The critter's stats go down each turn, requiring the player to make it do something.

Main Class: CritterCaretaker.

  • This class will be similar in a lot of ways to CardAndDeckTester
  • it should simply give them the options of making the critter go to bed, feeding it, waking it up, playing with it, or passing a turn (these will be done visually now, not through a traced menu).
  • Every turn it should print out the Critter's current status, as well as the results of the last action (this will be done on the stage as well).
Share and Enjoy:
  • Digg
  • StumbleUpon
  • del.icio.us
  • Facebook
  • Twitter
  • Google Bookmarks
  • Fark
  • Google Buzz

Comments are closed.