Class AgentSQ1D<T extends AgentGrid1D>

  • Type Parameters:
    T - the extended AgentGrid2D class that the agents will live in Created by rafael on 11/18/16.
    All Implemented Interfaces:
    java.io.Serializable

    public class AgentSQ1D<T extends AgentGrid1D>
    extends Agent1DBase<T>
    implements java.io.Serializable
    extend the AgentSQ2D class if you want agents that exist on a 2D discrete lattice with the possibility of stacking multiple agents on the same typeGrid square
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class HAL.GridsAndAgents.AgentBase

        G
    • Constructor Summary

      Constructors 
      Constructor Description
      AgentSQ1D()  
    • Constructor Detail

      • AgentSQ1D

        public AgentSQ1D()
    • Method Detail

      • MoveSafeSQ

        public void MoveSafeSQ​(int newX)
        Moves the agent to the specified square, will apply wraparound if it is enabled
      • MoveSafeSQ

        public void MoveSafeSQ​(int newX,
                               Coords1DBool IsValidMove)
      • Xsq

        public int Xsq()
        gets the xDim coordinate of the square that the agent occupies
        Specified by:
        Xsq in class Agent1DBase<T extends AgentGrid1D>
      • Age

        public int Age()
        Description copied from class: AgentBase
        returns the age of the agent, in ticks. Be sure to use IncTick on the AgentGrid appropriately for this function to work.
        Specified by:
        Age in class AgentBase<T extends AgentGrid1D>