String in = theMessage.theMessage;
theCode = theMessage.messageCode;
long receptionTime = theMessage.receptionTime;
notifyObservers(new PlayerReceivedMessageEvent(in));
Request request = new RequestFactory().create(gamer, in);
if(request instanceof StartRequest) {
RandomGamer theDefaultGamer = new RandomGamer();
new RequestFactory().create(theDefaultGamer, in).process(1);
GamerLogger.startFileLogging(theDefaultGamer.getMatch(), theDefaultGamer.getRoleName().toString());
GamerLogger.log("Proxy", "[ProxyClient] Got message: " + theMessage);
}
String out = request.process(receptionTime);
ProxyMessage outMessage = new ProxyMessage("DONE:" + out, theCode, 0L);
outMessage.writeTo(theOutput);
GamerLogger.log("Proxy", "[ProxyClient] Sent message: " + outMessage);
notifyObservers(new PlayerSentMessageEvent(out));