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 setNames(ArrayList<String> names) {
   for (int i = 0; i < names.size(); i++) {
     if (nicknameSet[i]) continue;
     players[i].setName(names.get(i));
     screen.setPlayerName(i, names.get(i));
   }
   for (int i = names.size(); i < 4; i++) {
     if (nicknameSet[i]) continue;
     screen.setPlayerName(i, players[i].getName());
   }
   setName(pid, getStatisticsController().getName());
 }
 public void setActivePlayer(int player) {
   screen.setActivePlayer(player);
   if (player == pid) {
     if (reminderTask.isScheduled()) return;
     turnReminder.scheduleTask(reminderTask, REMINDER_INTERVAL, REMINDER_INTERVAL);
   } else cancelReminder();
 }
 public PlayerController(PlayerModel[] players, int pid, GameScreen screen) {
   this.screen = screen;
   this.pid = pid;
   this.players = players;
   for (int i = 0; i < 4; i++) {
     screen.setPlayerName(i, players[i].getName());
     nicknameSet[i] = false;
   }
   simulator = new GameSimulator(new AiConfig(), getWhistAiCallback(), Config.AUTOPLAY_DELAY);
 }
 public void layoutCards() {
   Array<Card> cards = Pools.obtain(Array.class);
   for (int i = 0; i < 4; i++) {
     cards.clear();
     for (int c : players[i].getCards()) cards.add(getCardController().getCard(c));
     screen.playDealingAnimation(i, cards);
   }
   cards.clear();
   Pools.free(cards);
 }
 @Override
 public void run() {
   getSounds().playTurnSound();
   screen.nudgePlayerCards(pid);
 }
 public void animateValidCards(int player, Array<Card> cards) {
   screen.animateValidCards(player, cards);
 }
 public void setName(int playerIndex, String nickname) {
   nicknameSet[playerIndex] = true;
   players[playerIndex].setName(nickname);
   screen.setPlayerName(playerIndex, nickname);
 }
 public void playCard(int player, int card) {
   players[player].throwCard(card);
   screen.throwCard(player, getCardController().getCard(card));
 }
 private void resetBausen() {
   screen.resetBausen();
 }
 public void layoutBausen(int player, boolean reset, int round) {
   if (reset) players[player].setAchievedNo(0, round);
   screen.updateBausen(
       player, players[player].getDeclaredNo(round), players[player].getAchievedNo(round), reset);
 }
 public void reset() {
   screen.resetPlayerViews();
   for (int i = 0; i < 4; i++) players[i].reset();
 }