public void pickUp(Item item, Location location) {
// code for other checks
if item equals bag {
inventory size increased;
}
How you determine if item equals bag is up to you and will...
Type: Posts; User: Junky
public void pickUp(Item item, Location location) {
// code for other checks
if item equals bag {
inventory size increased;
}
How you determine if item equals bag is up to you and will...
The first thing you would need to do is test if the item picked up was the "bag". If it was then increase the inventory size.