Class Event

  • Direct Known Subclasses:
    ChallengeTickEvent, GameOverEvent, TileClickedEvent, TileStatusEvent

    public abstract class Event
    extends java.lang.Object
    Events are messages send from the game to the bot. These are used to notify the bot of changes in the game. The most prominent Event is the ChallengeTickEvent, indicating a new challenge tick has started.
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  Event.EventType
      Type of incoming events.
    • Constructor Summary

      Constructors 
      Constructor Description
      Event()
      abstract Event constructor
    • Constructor Detail

      • Event

        public Event()
        abstract Event constructor
    • Method Detail

      • getEventType

        public Event.EventType getEventType()
        Get EventType from Event object.
        Returns:
        event type
      • deserialize

        public static Event deserialize​(org.json.JSONObject json)
        Deserializes an Event. Takes a JSONObject as argument and tries to parse it. Returns null on error.
        Parameters:
        json - json data
        Returns:
        Event or null on error.