Class ActionsList


  • public class ActionsList
    extends java.lang.Object
    A list of action, to be send to the game together. Sending a action list indicates the end of a challenge tick.
    • Constructor Summary

      Constructors 
      Constructor Description
      ActionsList()
      Creates an empty ActionsList
      ActionsList​(java.util.List<Action> list)
      Creates a ActionList from a Actions list.
      ActionsList​(Action act)
      Creates a ActionList from a single action.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void add​(Action action)
      Adds one action to the action list.
      java.lang.String serialize()
      serializes the action list to a json string
      int size()
      amount of action in the action list.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ActionsList

        public ActionsList()
        Creates an empty ActionsList
      • ActionsList

        public ActionsList​(java.util.List<Action> list)
        Creates a ActionList from a Actions list.
        Parameters:
        list - action list
      • ActionsList

        public ActionsList​(Action act)
        Creates a ActionList from a single action.
        Parameters:
        act - action list
    • Method Detail

      • add

        public void add​(Action action)
        Adds one action to the action list.
        Parameters:
        action - action to add
      • size

        public int size()
        amount of action in the action list.
        Returns:
        amount of actions
      • serialize

        public java.lang.String serialize()
        serializes the action list to a json string
        Returns:
        json string