A Sack object should be created to house presents that a Player picks up.
It should have the following:
Max value of presents it can hold (int)
ArrayList of Present objects on the sack
Current value of presents in the sack (length of array)
In addition to this, there should be helper methods like so:
add Present to Sack
remove x Presents from Sack (and return the sub-ArrayList of them (this is for when a Player gets hit by an enemy, the x Presents removed can be random))
You should also see about adding a Sack field variable to the Player object (so a Player can have their own Sack)
A Sack object should be created to house presents that a Player picks up.
It should have the following:
In addition to this, there should be helper methods like so:
You should also see about adding a Sack field variable to the Player object (so a Player can have their own Sack)