return new MessageUpdate(graph, detectiveMoves.getMoves(), ClientType.DETECTIVE);
}
logger.debug("Distributing tickets used by detectives to phantoms");
for(MessageMove.ActorMove m : detectiveMoves.getMoves()) {
TransportType transport = m.getTransportType();
if(transport.isUsedByPhantom()) {
int lucky = rnd.nextInt(phantoms.size()); //TODO: With multiple phantoms, how should the tickets be distributed?
Actor luckyActor = phantoms.get(lucky);
logger.info(String.format("Phantom %s gets one ticket for transport %s", luckyActor.getId(), transport.getName()));
phantoms.get(lucky).addTicket(transport);
}
}
// Inform the phantom.