protected void processStyle12ExamineAndSetupAdjustment(Game game,Style12Message message,GameService service,String entireMessage){
  if (LOG.isDebugEnabled()) {
    LOG.debug("Processing bsetup/examine/obs examine position move.");
  }
  if (game.isInState(Game.OBSERVING_EXAMINED_STATE) && message.relation == Style12Message.EXAMINING_GAME_RELATION) {
    if (LOG.isDebugEnabled()) {
      LOG.debug("Handling observer became examiner transition.");
    }
    examineGamesWaitingOnMoves.put(game.getId(),message);
    connector.sendMessage("moves " + message.gameId,true,ChatType.MOVES);
  }
 else   if (entireMessage.contains("- entering examine mode.") || entireMessage.contains(". Entering examine mode.")) {
    if (LOG.isDebugEnabled()) {
      LOG.debug("Handling bsetup to examine mode transition.");
    }
    Game examineGame=IcsUtils.createGame(message,entireMessage);
    if (message.relation == Style12Message.EXAMINING_GAME_RELATION && !examineGame.isInState(Game.SETUP_STATE)) {
      examineGamesWaitingOnMoves.put(game.getId(),message);
      connector.sendMessage("moves " + message.gameId,true,ChatType.MOVES);
    }
  }
 else   if (game.isInState(Game.EXAMINING_STATE) && (entireMessage.contains("Entering setup mode.\n") || entireMessage.contains("enters setup mode."))) {
    if (LOG.isDebugEnabled()) {
      LOG.debug("Handling examined game became setup game transition.");
    }
    processExaminedGameBecameSetup();
  }
 else   if (entireMessage.contains("entering examine mode.\n") || entireMessage.contains("Entering examine mode.\n")) {
    examineGamesWaitingOnMoves.put(game.getId(),message);
    connector.sendMessage("moves " + message.gameId,true,ChatType.MOVES);
  }
 else {
    IcsUtils.resetGame(game,message);
    service.fireGameStateChanged(message.gameId,false);
    connector.sendMessage("moves " + message.gameId,true,ChatType.MOVES);
  }
}

protected void processStyle12ExamineAndSetupAdjustment ( Game game , Style12Message message , GameService service , String entireMessage ) { if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "Processing bsetup/examine/obs examine position move." ) ; } if ( game . isInState ( Game . OBSERVING_EXAMINED_STATE ) && message . relation == Style12Message . EXAMINING_GAME_RELATION ) { if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "Handling observer became examiner transition." ) ; } examineGamesWaitingOnMoves . put ( game . getId ( ) , message ) ; connector . sendMessage ( "moves " + message . gameId , true , ChatType . MOVES ) ; } else if ( entireMessage . contains ( "- entering examine mode." ) || entireMessage . contains ( ". Entering examine mode." ) ) { if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "Handling bsetup to examine mode transition." ) ; } Game examineGame = IcsUtils . createGame ( message , entireMessage ) ; if ( message . relation == Style12Message . EXAMINING_GAME_RELATION && ! examineGame . isInState ( Game . SETUP_STATE ) ) { examineGamesWaitingOnMoves . put ( game . getId ( ) , message ) ; connector . sendMessage ( "moves " + message . gameId , true , ChatType . MOVES ) ; } } else if ( game . isInState ( Game . EXAMINING_STATE ) && ( entireMessage . contains ( "Entering setup mode.\n" ) || entireMessage . contains ( "enters setup mode." ) ) ) { if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "Handling examined game became setup game transition." ) ; } processExaminedGameBecameSetup ( ) ; } else if ( entireMessage . contains ( "entering examine mode.\n" ) || entireMessage . contains ( "Entering examine mode.\n" ) ) { examineGamesWaitingOnMoves . put ( game . getId ( ) , message ) ; connector . sendMessage ( "moves " + message . gameId , true , ChatType . MOVES ) ; } else { IcsUtils . resetGame ( game , message ) ; service . fireGameStateChanged ( message . gameId , false ) ; connector . sendMessage ( "moves " + message . gameId , true , ChatType . MOVES ) ; } }
setup and examine and observing examine style 12 adjustments flow through here .
