Class EntityZone<E extends Entity>

java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
net.demilich.metastone.game.entities.EntityZone<E>
Type Parameters:
E - The subclass of Entity that is stored. For example, Spellsource.ZonesMessage.Zones.BATTLEFIELD can only store Minion entities.
All Implemented Interfaces:
Serializable, Cloneable, Comparable<EntityZone<? extends Entity>>, Iterable<E>, Collection<E>, List<E>
Direct Known Subclasses:
CardZone

public class EntityZone<E extends Entity> extends AbstractList<E> implements List<E>, Iterable<E>, Cloneable, Serializable, Comparable<EntityZone<? extends Entity>>
EntityZone is an abstract list that enforces that (1) supports gameplay-safe cloning and (2) enforces that an Entity object is only in one zone at any time.

Each zone has a corresponding Spellsource.ZonesMessage.Zones and owning Player ID.

See Also:
  • Field Details

    • zone

      protected final com.hiddenswitch.spellsource.rpc.Spellsource.ZonesMessage.Zones zone
    • lookup

      protected Map<Integer,Entity> lookup
    • player

      protected int player
    • internal

      protected final List<E extends Entity> internal
  • Constructor Details

    • EntityZone

      public EntityZone(int player, com.hiddenswitch.spellsource.rpc.Spellsource.ZonesMessage.Zones zone, Map<Integer,Entity> lookup)
  • Method Details