} else if (c == HINT) {
} else if (c == NEXT10MOVES) { gc.do10NextMoves(); Gome.singleton.mainCanvas.refresh(); } else if (c == PREV10MOVES) { gc.do10PrevMoves(); Gome.singleton.mainCanvas.refresh(); }  else if (c == HINT) {
  public void commandAction(Command c, Displayable d) {    try {      Gome.singleton.mainCanvas.setSplashInfo(null);      if (d == Gome.singleton.mainCanvas) {        if (c == NEW) {          if (gc.getPlayMode() != GameController.ONLINE_MODE) {            //#ifdef DEBUG            log.info("Game Mode: " + gc.getPlayMode());            //#endif            newGameForm = createNewGameMenu();            Gome.singleton.display.setCurrent(newGameForm);          }        } else if (c == FILES) {          try {            if (fileBrowser == null) {              //#ifdef MIDP2              fileBrowser = new FileBrowser(Gome.singleton.mainCanvas, this, IOManager.singleton.getRootBundledGamesList(), "/", false);              //#else              //# fileBrowser = new FileBrowserV1(Gome.singleton.mainCanvas, this, IOManager.singleton.getRootBundledGamesList(), "/", false);              //#endif            }            fileBrowser.show(Gome.singleton.display);          } catch (IOException e1) {            Util.messageBox(Gome.singleton.bundle.getString("ui.error"), Gome.singleton.bundle.getString(e1.getMessage()), AlertType.ERROR); //$NON-NLS-1$          }        }        //#ifdef IGS        else if (c == IGS_CONNECT) {          gc.connectToServer();        } else if (c == IGS_GAMELIST) {          gc.getServerGameList();        } else if (c == IGS_USERLIST) {          gc.getServerUserList();        } else if (c == IGS_DISCONNECT) {          gc.disconnectFromServer();        } else if (c == IGS_MESSAGE) {          chat.sendMessage(currentChallenge.nick, null, null, Gome.singleton.mainCanvas);        } else if (c == REQUEST_KOMI) {          gomeOnlineWantKomi();        } else if (c == CHANGE_ONLINE_HANDICAP) {          gomeOnlineChangeHandicap();        }        //#endif        else if (c == NEXT) {          gc.loadAndPlayNextInCollection(false);        } else if (c == PREVIOUS) {          gc.loadAndPlayNextInCollection(true);        } else if (c == FIRST_MOVE) {          gc.goToFirstMove();        } else if (c == LAST_MOVE) {          gc.goToLastMove();        } else if (c == EVALUATE) {          gc.startCountMode(true);        } else if (c == FINISHED_COUNTING) {          gc.doScore();        } else if (c == PASS) {          gc.pass();        } else if (c == SAVE) {          //#ifdef MIDP2          FileBrowser fb = new FileBrowser(Gome.singleton.mainCanvas, this, IOManager.singleton.getRootBundledGamesList(), "/", true);          //#else          //# FileBrowserV1 fb = new FileBrowserV1(Gome.singleton.mainCanvas, this, IOManager.singleton.getRootBundledGamesList(), "/", true);                    //#endif          new IndexLoader(new IndexEntry(IOManager.LOCAL_NAME, null, ""), fb).show(Gome.singleton.display);        } else if (c == OPTIONS) {          optionsForm = new Options(Gome.singleton.bundle.getString("ui.options"), this, false);          Gome.singleton.display.setCurrent(optionsForm);        }        //#ifdef DEBUG        else if (c == CONSOLE) {          logCanvas = Logger.getLogCanvas();          logCanvas.addCommand(BACK);          logCanvas.setCommandListener(this);          Gome.singleton.display.setCurrent(logCanvas);        }        //#endif        else if (c == COMMENT) {          gc.doCycleBottom();          gc.tuneBoardPainter();          Gome.singleton.mainCanvas.refresh();        } else if (c == ZOOM) {          gc.setZoomIn(!gc.isZoomIn());          gc.tuneBoardPainter();          Gome.singleton.mainCanvas.refresh();        } else if (c == UNDO) {          if (gc.doUndo()) {            gc.tuneBoardPainter();            Gome.singleton.mainCanvas.refresh();          }        } else if (c == HINT) {          gc.reverseShowHint();          gc.tuneBoardPainter();          Gome.singleton.mainCanvas.refresh();        }        else if (c == HELP) {          //#ifdef DEBUG          log.debug("help");          //#endif          Info help = new Info(Gome.singleton.mainCanvas);          help.show(Gome.singleton.display);        } else if (c == MenuEngine.GAME_STATUS) {          Info help = new Info(Gome.singleton.mainCanvas, MenuEngine.GAME_STATUS);          help.show(Gome.singleton.display);        }        else if (c == EXIT) {          Gome.singleton.notifyDestroyed();        } else if (c == RESIGN) {          gc.resign();        }        //#ifdef IGS        else if (c == IGS_RESET_DEAD_STONES) {          gc.gomeRestoreGameForCounting();        } else if (c == IGS_DONE_SCORE) {          gc.doneWithScore();        }        //#endif      } else if (d == optionsForm) {        if (c == SAVE) {          if (!optionsForm.save())            return;          gc.setPlayMode(gc.getPlayMode());        }        optionsForm = null;        Gome.singleton.mainCanvas.show(Gome.singleton.display);      } else if (d == newGameForm) {        if (c == START) {          startNewGame();        }        newGameForm = null;        Gome.singleton.mainCanvas.show(Gome.singleton.display);      } else if (d == saveGameForm) {        if (c == SAVE) {          try {            IOManager.singleton.saveLocalGame(gameFileName.getString(), gc.getSgfModel());          } catch (RecordStoreException e) {            Util.messageBox(Gome.singleton.bundle.getString("ui.error"), Gome.singleton.bundle.getString(e.getMessage()), AlertType.ERROR); //$NON-NLS-1$          }        }        saveGameForm = null;        Gome.singleton.mainCanvas.show(Gome.singleton.display);      }      //#ifdef IGS      else if (d == igsGameList) {        if (c == IGS_OBSERVE || c == List.SELECT_COMMAND) {          gc.observeServerGame(igsGameList.getSelectedIndex());        }        igsGameList = null;        Gome.singleton.mainCanvas.show(Gome.singleton.display);      } else if (d == igsUserList) {        if (c == IGS_CHALLENGE || c == List.SELECT_COMMAND) {          gc.challengeServerUser(igsUserList.getSelectedIndex());          igsUserList = null;        } else if (c == IGS_MESSAGE) {          chat.sendMessage(gc.getNick(igsUserList.getSelectedIndex()), "", "", Gome.singleton.mainCanvas);          return;        } else if (c == IGS_SORT_BY_RANK) {          if (ServerUser.sortCriteria == ServerUser.RANK) {            ServerUser.sortOrder = !ServerUser.sortOrder;          } else {            ServerUser.sortCriteria = ServerUser.RANK;          }          refreshUserList(gc.igs.getUserList());          return;        } else if (c == IGS_SORT_BY_NICK) {          if (ServerUser.sortCriteria == ServerUser.NICK) {            ServerUser.sortOrder = !ServerUser.sortOrder;          } else {            ServerUser.sortCriteria = ServerUser.NICK;          }          refreshUserList(gc.igs.getUserList());          return;        } else if (c == IGS_SORT_BY_WATCH) {          if (ServerUser.sortCriteria == ServerUser.WATCH) {            ServerUser.sortOrder = !ServerUser.sortOrder;          } else {            ServerUser.sortCriteria = ServerUser.WATCH;          }          refreshUserList(gc.igs.getUserList());          return;        }        Gome.singleton.mainCanvas.show(Gome.singleton.display);      } else if (d == challengeForm) {        if (c == IGS_CHALLENGE) {          gc.acceptChallenge(currentChallenge);        } else if (c == IGS_DECLINE) {          gc.declineChallenge(currentChallenge);        }        challengeForm = null;        Gome.singleton.mainCanvas.show(Gome.singleton.display);      } else if (d == onlineChangeHandicapForm) {        if (c == ACCEPT) {          gc.gomeSetOnlineHandicap(Byte.parseByte(newGameHandicap.getString()));        }        onlineChangeHandicapForm = null;        Gome.singleton.mainCanvas.show(Gome.singleton.display);      } else if (d == oppRequestKomiForm) {        if (c == ACCEPT) {          gc.onlineSetKomi(komi);          gc.setKomi(komi);        }        oppRequestKomiForm = null;        Gome.singleton.mainCanvas.show(Gome.singleton.display);      } else if (d == requestOnlineKomiForm) {        if (c == REQUEST) {          int i = setKomi.getSelectedIndex();          byte k = Byte.parseByte(newGameKomi.getString());          gc.gomeWantToSetOnlineKomi((byte) (k * 2), i);        }        requestOnlineKomiForm = null;        Gome.singleton.mainCanvas.show(Gome.singleton.display);      }      //#endif      //#ifdef DEBUG      else if (d == logCanvas) {        Gome.singleton.mainCanvas.show(Gome.singleton.display);      }      //#endif    } catch (Throwable t) {      //#ifdef DEBUG      log.error(t);      //#endif    }  }