コード例 #1
0
  public void requestAction(GameModel model) {
    int currentPlayer = model.getState().getCurrentPlayer();
    boolean declaringBausen = model.getState().isDeclaringBausen();

    setActivePlayer(currentPlayer);
    if (model.getState().getCurrentPlayer() != 0 || Config.AUTOPLAY) {
      if (declaringBausen) simulator.howManyToDeclare(model, currentPlayer, getRestriction(model));
      else simulator.whichCardToPlay(model, currentPlayer);
    } else {
      getSettings().doVibrate(ACTIVE_VIBRATION_LENGTH, ACTIVE_PLAYER_VIBRATION_DELAY);
    }
  }
コード例 #2
0
 private void cancelAI() {
   if (simulator != null) simulator.stop();
 }