All pastes #824992 Raw Edit

Stuff

public text v1 · immutable
#824992 ·published 2007-12-20 07:46 UTC
rendered paste body
//Java:
HashMap<Integer, Integer> playerSkillselections = playerHeroes.get(entry
                                    .getName());
                            if (playerSkillselections != null)
                            {
                                Integer countSelections = playerSkillselections.get(playerid);
                                if (countSelections != null)
                                {
                                    Integer newValue = new Integer(countSelections.intValue() + 1);
                                    playerSkillselections.put(playerid, newValue);
                                    playerHeroes.put(entry.getName(), playerSkillselections);
                                }
                                else
                                {
                                    playerSkillselections.put(playerid, new Integer(1));
                                }
                            }
                            else
                            {
                                playerSkillselections = new HashMap<Integer, Integer>();
                                playerSkillselections.put(playerid, new Integer(1));
                                playerHeroes.put(entry.getName(), playerSkillselections);
                            }

//C++ :
playerHeroes[entry.getName()][playerid]++;