vgmoose / movement

Christmas Crunchtime (tentative title)
1 stars 0 forks source link

bin: added initial classes #8

Closed pdonlon closed 10 years ago

vgmoose commented 10 years ago

So, many things with this:

  1. Chillax with the constructors. Things like the ArrayList that underlies the Sack will never need to be passed to it (It shouldn't matter what the Sack is using behind the scenes to hold the Presents, as long as it gets the job done. ABSTRACTION).
  2. Your commit message is absolutely just the worst. I don't know what your intention with it was because a) you aren't adding to bin at all, and b) you didn't even go onto describe the initial classes you made. Please refer to the README to see how to write a proper commit message, or take a look at mine above.
  3. Some of the requested stuff is missing, like a method to clear the Sack of its Presents, or even a basic check of whether or not adding a Present to the Sack is possible (like if it's full, you can't add)
  4. I removed your Java Game class and turned it into a test suite. Junit test time yaaaaaay

So from here on out:

  1. Write good commit messages that detail what you actually did
  2. Fill out the various TODO comments I've added in the code (including tests!)
  3. Try to think about the class you're making as an actual object, you aren't JUST making skeletons, the Sack needs to check if it is full or not to tell whether or not it can add a new Present.

Speaking of the Sack, we are probably going to need to pass it a boolean to keep track of whether a Sack is quantity-based or weight-based. This boolean would decide which factor prevents it from allowing additional presents to be added to it.