java.lang.Object
eu.iv4xr.framework.extensions.ltl.gameworldmodel.GWState
All Implemented Interfaces:
IExplorableState, IState

public class GWState extends Object implements IExplorableState
Representing the state of the game-world; or more precisely a state in GameWorldModel. A state consists of game-objects that populate the game-world, the agent current and previous positions.
Author:
Samira, Wish.
  • Field Details

    • objects

      public Map<String,​GWObject> objects
      The objects in the game.
    • currentAgentLocation

      public String currentAgentLocation
      Current agent location, which is an id of an object, representing that the physical location of the agent is in the near vicinity of the object. (this also means that we cannot represent a location that is half-way towards the object)
  • Constructor Details

    • GWState

      public GWState()
  • Method Details

    • addObjects

      public void addObjects(GWObject... objects)
    • setAsCurrentLocation

      public void setAsCurrentLocation(GWObject e)
    • markAsDestroyed

      public void markAsDestroyed(String id)
    • showState

      public String showState()
      Description copied from interface: IState
      Produce a string representation of the state for the purpose of printing it e.g. when needed to print a witnessing execution trace that contains the state. It is not required that the string representation fully reflects the state.
      Specified by:
      showState in interface IState
    • clone

      public IExplorableState clone()
      Specified by:
      clone in interface IExplorableState
      Overrides:
      clone in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object