Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- } else {
- ArrayList<Integer> winners = groups.get(0);
- double territory = 0d;
- int userWithMostTerritory = winners.get(0);
- for (Integer user : winners) {
- double userTerritory = 0d;
- for (TerritoryEntry tmp : bd.getTerritoryEntry()) {
- if (tmp.getCombatRoundId() == lastRound.getId()
- && tmp.getUserId() == user) {
- if (tmp.getTerritorySize() > userTerritory) {
- userTerritory = tmp.getTerritorySize();
- }
- }
- }
- if (userTerritory > territory) {
- territory = userTerritory;
- userWithMostTerritory = user;
- }
- }
- if (debug) {
- DebugBuffer.addLine(DebugLevel.GROUNDCOMBAT, "User with most territory : " + userDAO.findById(userWithMostTerritory).getGameName());
- }
- if (userWithMostTerritory == 0) {
- DebugBuffer.addLine(DebugLevel.GROUNDCOMBAT, "UserId with most territory is 0");
- }
- movePlanetToPlayer(userWithMostTerritory, bd.getPlanetId(), bd.getPlayerPlanet(), bd.getGroundCombatId());
- }
Add Comment
Please, Sign In to add comment