rlgamekit.equipment
Interface Constraint<E>


public interface Constraint<E>

Not all items fit into all equipment slots. Slots which can take only some items can be guarded by constraints. Games need to subclass this and implement their game specific constraints for equipment slots.

See Also:
Equipment

Method Summary
 boolean isAllowed(int slot, E item)
          Check if item is allowed in an equipment slot.
 

Method Detail

isAllowed

boolean isAllowed(int slot,
                  E item)
Check if item is allowed in an equipment slot.

Parameters:
slot - the slot number.
item - The item to check.
Returns:
true if allowed, false otherwise.