Project 1C — Inventory and Debugging (Your Language)

Add an inventory to your game: the player can pick up items and use them. Then find and fix planted bugs in your own code. Finding bugs is part of the project, so keep a record of how you found each one.

Goals: what this project shows, in any language

By the end of 1C, your code should show that you can:

  1. Keep an inventory in a list (or your language's equivalent), and add an item to it when the player picks something up.
  2. Print the inventory by looping over the list, so the player can see what they're carrying.
  3. Use an item with a condition, such as a key that opens one room only.
  4. Find and fix 2–3 planted bugs in your game.
  5. Record each bug: what the symptom was, how you found the cause, and what the fix was.

What to Hand In

  • The game runs with the inventory working, and each planted bug is fixed
  • A debugging record in your README: one short entry per bug
  • The concept log is complete: every concept in the track list has a row, with how your language writes it
  • A commit with the prefix CP3:, pushed before your one-on-one

Every shared rule is on the Common Parameters card.

Getting Started

Add the inventory list first and print it, before you add any items to the game. Then add the pick-up and use steps.

When a bug shows up, don't guess. Print the variables just before the problem line, and read what they actually hold.

What's Next

Coming up: Unit 2 — you'll choose your level with your teacher, using this unit's work.