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); } }
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); } }
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); }