Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public String checkHighDeaths() {
- String result = "";
- MatchPlayer highDeath = null;
- Iterator<MatchPlayer> i = m_players.iterator();
- while (i.hasNext()) {
- MatchPlayer temp = i.next();
- if (temp.getPlayerState() == MatchPlayer.IN_GAME) {
- if (highDeath == null)
- highDeath = temp;
- if (temp.getDeaths() > highDeath.getDeaths()) {
- highDeath = temp;
- result = highDeath.getPlayerName();
- }
- if (temp.getDeaths() == highDeath.getDeaths()) {
- result += "/" + highDeath.getPlayerName();
- }
- }
- }
- return result + " - " + highDeath;
- }
Add Comment
Please, Sign In to add comment