Search in sources :

Example 1 with CappedQueue

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);
}
Also used : SOCGame(soc.game.SOCGame) CappedQueue(soc.util.CappedQueue)

Aggregations

SOCGame (soc.game.SOCGame)1 CappedQueue (soc.util.CappedQueue)1