public Server() { gameManager = new GameManager(); eventHandlerService = new EventHandlerServiceImpl(); messageSerializerService = new MessageSerializerService(); netService = new NetServiceImpl(); netService.setEventHandler(eventHandlerService); eventHandlerService.setGameManager(gameManager); gameManager.setNetService(netService); gameManager.setMessageSerializer(messageSerializerService); messageSerializerService.setNetService(netService); }
public void setMessageSerializer(MessageSerializerService messageSerializer) { this.messageSerializer = messageSerializer; }