use of soc.util.CappedQueue in project JSettlers2 by jdmonin.
the class SOCRobotClient method handleJOINGAMEAUTH.
/**
* handle the "join game authorization" message
* @param mes the message
* @param isPractice Is the server local for practice, or remote?
*/
@Override
protected void handleJOINGAMEAUTH(SOCJoinGameAuth mes, final boolean isPractice) {
gamesPlayed++;
final String gaName = mes.getGame();
SOCGame ga = new SOCGame(gaName, true, gameOptions.get(gaName));
ga.isPractice = isPractice;
games.put(gaName, ga);
CappedQueue<SOCMessage> brainQ = new CappedQueue<SOCMessage>();
brainQs.put(gaName, brainQ);
SOCRobotBrain rb = createBrain(currentRobotParameters, ga, brainQ);
robotBrains.put(gaName, rb);
}
Aggregations