Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.
 
 
 
 
 

28 рядки
903 B

  1. package events;
  2. import com.fasterxml.jackson.databind.JsonNode;
  3. import akka.actor.ActorRef;
  4. import structures.GameState;
  5. /**
  6. * A generic event processor interface, implemented by all classes that process events
  7. * sent from the user interface.
  8. * @author Dr. Richard McCreadie
  9. *
  10. */
  11. public interface EventProcessor {
  12. /**
  13. * The processEvent method takes as input the contents of the event in the form of a
  14. * Jackson JsonNode object, which contains a set of key-value pairs (the information
  15. * about the event). It also takes in a copy of an ActorRef object, which can be used
  16. * to send commands back to the front-end, and a reference to the GameState class,
  17. * which as the name suggests can be used to hold game state information.
  18. * @param message
  19. * @return
  20. */
  21. public void processEvent(ActorRef out, GameState gameState, JsonNode message);
  22. }