public synchronized void updateTopScores(List<GameScore> scores) { int last = Math.min(scores.size(), scoreControllers.size()); for (int rank = 0; rank < last; rank++) { GameScore gs = scores.get(rank); TopScoreController tsc = scoreControllers.get(rank); tsc.updateScore(gs.getName(), gs.getAddress(), gs.getScore()); } }
public void updateTopScore(String name, String address, int score, int rank) { TopScoreController tsc = scoreControllers.get(rank); tsc.updateScore(name, address, score); }