@Override public Collection<GameLabel> getLabels(final Player access) throws GameException { final ArrayList<GameLabel> arrayList = new ArrayList<GameLabel>(); if (_currentState == GameState.Lobby) { arrayList.addAll(_mplayerManager.getLobbyLabels(this, access)); } else if (_currentState == GameState.Playing) { int idx = 0; GameLabel cmdButton = new GameLabel("SubmitWord", new IndexPosition(CURVE_CMDS, idx++), "Submit Word"); cmdButton.setCommand("Enter Word"); cmdButton.setWidth(150); arrayList.add(cmdButton); cmdButton = new GameLabel("Finish", new IndexPosition(CURVE_CMDS, idx++), "Finish"); cmdButton.setCommand("Finish"); cmdButton.setWidth(150); arrayList.add(cmdButton); cmdButton = new GameLabel("Clear", new IndexPosition(CURVE_CMDS, idx++), "Clear"); cmdButton.setCommand("Clear"); cmdButton.setWidth(150); arrayList.add(cmdButton); final long ctime = new Date().getTime(); final long etime = _roundEndTime.getTime(); final double timeLeft = (etime - ctime) / 1000.0; arrayList.add( new GameLabel( "TimeLeft", new IndexPosition(CURVE_CMDS, idx++), "<TIMER>" + Integer.toString((int) Math.ceil(timeLeft)) + "</TIMER> sec left")); final String txt = String.format( "My Score: %d (%d)", getScore(access), getWordList(access.getUserId()).size()); arrayList.add(new GameLabel("WordCount", new IndexPosition(CURVE_CMDS, idx++), txt)); for (final Participant p : _mplayerManager.getPlayerManager().getPlayers()) { if (p.equals(access)) { continue; } final String txt2 = String.format( "%s: %d (%d)", getDisplayName(p), getScore(access), getWordList(p.getId()).size()); arrayList.add(new GameLabel("WordCount", new IndexPosition(CURVE_CMDS, idx++), txt2)); } } else if (_currentState == GameState.Complete) { int idx = 0; final GameLabel cmdButton = new GameLabel("SubmitWord", new IndexPosition(CURVE_CMDS, idx++), "Deal Again"); cmdButton.setCommand("Deal"); cmdButton.setWidth(150); arrayList.add(cmdButton); } return arrayList; }