示例#1
0
 public void layoutBausenFromLoading(GameModel gameModel) {
   int round = gameModel.getState().getRound();
   int declared, achieved;
   for (int i = 0; i < 4; i++) {
     declared = gameModel.getPlayer(i).getDeclaredNo(round);
     achieved = gameModel.getPlayer(i).getAchievedNo(round);
     screen.updateBausen(i, declared, 0, true);
     for (int j = 0; j < achieved; j++) screen.updateBausen(i, declared, achieved, false);
   }
 }
示例#2
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);
    }
  }
示例#3
0
  int getRestriction(GameModel model) {
    GameState state = model.getState();
    int restriction =
        state.getCurrentPlayer() == (state.getTrickFirstPlayer() + 3) % 4
            ? state.getRound() - state.getTotalBausen()
            : -1;
    if (state.getRound() == 14) restriction--;

    return Math.max(restriction, -1);
  }