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:

    public class AgentSQ1D<T extends AgentGrid1D>
    extends Agent1DBase<T>
    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

    • Constructor Summary

      Constructor Description
    • 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>