org.haphazard.character.inventory
Interface InventoryAlgorithm

All Known Implementing Classes:
BestFit, Random, RelaxedBestFit

public interface InventoryAlgorithm

Interface for algorithms used to fit things in the inventory


Method Summary
 boolean add(Item item, java.util.Vector containers)
          Adds an item to a container
 boolean canHold(Item item, java.util.Vector containers)
          Checks if the specified containers can hold the specified item
 

Method Detail

add

public boolean add(Item item,
                   java.util.Vector containers)
Adds an item to a container

Parameters:
item - The item to add
containers - The number of containers to use for adding
Returns:
True if the item could be fit

canHold

public boolean canHold(Item item,
                       java.util.Vector containers)
Checks if the specified containers can hold the specified item

Parameters:
item - The item to hold
containers - The containers to use to store the item
Returns:
True if the containers can hold the item