Jump to content
  • 0

Fastlist -> Arraylist Acis


Question

Posted (edited)

http://imgur.com/a/1oYgm

protected int getWinnerTeam()
	{
		ArrayList<EventTeam> t = new ArrayList<>();
		
		for (EventTeam team : teams.values())
		{
			if (t.size() == 0)
			{
				t.add(team);
				continue;
			}
			
			if (team.getScore() > t.getFirst().getScore())
			{
				t.clear();
				t.add(team);
				continue;
			}
			
			if (team.getScore() == t.getFirst().getScore())
				t.add(team);
		}
		
		if (t.size() > 1)
			return 0;
		
		return t.getFirst().getId();
	}

getFirst () must be replaced by what?

Edited by L2shaken

Recommended Posts

  • 0
Posted

I wouldn't have done it the way he did as it doesn't meet my standard (static method would be to disallow override bad impl eg), yet that's works as well and shouldn't be blamed. It's just for arguing really.

  • 0
Posted (edited)

I wouldn't have done it the way he did as it doesn't meet my standard (static method would be to disallow override bad impl eg), yet that's works as well and shouldn't be blamed. It's just for arguing really.

 

For gods sake its just a convenience method that toggles last known players instance pointer for global access on the project... Should I make another class, will that make any difference? I don't get it why we are even talking about this. Codecrash was desperately squeezing my codes line by line to find a flaw so he can trashtalk about. Then he talks about standards he doesn't even know about.

Edited by xxdem
  • 0
Posted

 I argue with SweeTs

But I am not arguing with ya. No one gives a damn about you :lol:

 

 

That's when people that don't understand shit enter a debate

I was sure you are lurking around and sooner or later you show up :lol:

  • 0
Posted

For gods sake its just a convenience method that toggles last known players instance pointer for global access on the project... Should I make another class, will that make any difference? I don't get it why we are even talking about this. Codecrash was desperately squeezing my codes line by line to find a flaw so he can trashtalk about. Then he talks about standards he doesn't even know about.

Yeah I hate those util class as well.

 

Just it's not the purpose of interface static method but as I said it works great that way and can understand why you did it.

  • 0
Posted (edited)

Yeah I hate those util class as well.

 

Just it's not the purpose of interface static method but as I said it works great that way and can understand why you did it.

 

I am glad you get the point.

 

I agreed that static methods don't belong on interfaces for readability reasons, but a person with real knowledge knows that in the very end theres no actual difference. Static methods always belong to the class and even interfaces are always backed by one.

 

I bet that these noobs don't really know that even enums are actually classes and their values just pointers to self singleton references

Edited by xxdem
  • 0
Posted

It's so fucking hilarious. You judge EVERYONE in here (in a bad manner), for imperfect coding, i mean hell, you judged me without even looking at my coding and now that Elfo does the same thing to you, you feel the need to defend yourself.

 

That's what i meant by "a taste of your own medicine" and for some reason you and Sdw thought i was judging you as well, or licking Elfo. My point was, that if you judge everyone for the slightest things, be prepared for the same to happen to you.

  • 0
Posted

Yet, when you say things such as "Good job owning him", make sure you understand properly what you just read.

 

 

2 people arguing might be right, or wrong at the same time.

  • 0
Posted (edited)

Yet, when you say things such as "Good job owning him", make sure you understand properly what you just read.

 

 

2 people arguing might be right, or wrong at the same time.

Please read my post again, only thing i said was "well played", which i still believe because it's the first time i see this retard taking a defensive stance and not attacking everyone.

 

 

It's funny to see the man that judges everyone and everything finally getting a taste of his own medicine.

 

Well played Elfo, well played.

Edited by Versus
  • 0
Posted

It's so fucking hilarious. You judge EVERYONE in here (in a bad manner), for imperfect coding, i mean hell, you judged me without even looking at my coding and now that Elfo does the same thing to you, you feel the need to defend yourself.

 

That's what i meant by "a taste of your own medicine" and for some reason you and Sdw thought i was judging you as well, or licking Elfo. My point was, that if you judge everyone for the slightest things, be prepared for the same to happen to you.

 

I welcome it, but his argument was shit, none was supposed to say good played at him

  • 0
Posted (edited)

lol, this topic is a masterpiece... :lol:

Take a step back and literally kiss your own face. This topic is valuable. Worths 4k euro more than  stalonka leech

Crawl back to your cave cause noone loves you :'( sad storki

Edited by AccessDenied
  • 0
Posted

Take a step back and literally kiss your own face. This topic is valuable. Worths 4k euro more than  stalonka leech

Crawl back to your cave cause noone loves you :'( sad storki

Me don't care... :lol:

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



  • Posts

    • ## SuperPoint Editor   SuperPoint Editor is a practical visual editor for Lineage II PTS 'SuperPoint.bin' files. It is built for people who need to inspect, fix, rebuild, and draw server routes without digging through binary data by hand.   ### What You Can Do   - Open and edit 'SuperPoint.bin' files. - Export BIN data into a readable TXT format. - Save edited data back into a valid BIN file. - Validate routes before saving. - Work with SuperPoint routes, points, directed connections, and path records in tables. - Add, duplicate, delete, and reorder points. - Create direct and reverse connections between route points. - Automatically generate connections between neighboring points. - Edit raw point coordinates: 'X', 'Y', 'Z', 'Index', and 'Delay'. - Keep route names and internal route data organized. - Use either English or Ukrainian interface language.   ### C4 Server Support   Some C4 servers have 'SuperPoint.bin', but do not have 'superpointinfo.txt' in scripts. The editor supports this case directly. When 'superpointinfo.txt' is not found near the BIN file, the editor can open the BIN in C4 mode. In this mode, 'Fstring ID' is disabled because that value belongs to 'superpointinfo.txt', not to the BIN itself. The editor will not generate or modify 'superpointinfo.txt' while working in this mode. This keeps C4 data clean and avoids creating script files that the server does not actually use.   ### superpointinfo.txt Support   For chronicles that do use 'superpointinfo.txt', the editor can load and synchronize it together with the BIN data. When saving, the editor updates route nodes and coordinates while preserving existing metadata such as: - 'npc_name' - 'move_type' - 'fstring_index' - 'social_number' - 'delay' New nodes are generated with safe default values, so existing script metadata is not accidentally wiped.   ### Geodata Tools   The editor can also open converted geodata '.dat' files and display them as a map. This makes route editing much more visual. You can: - Load geodata and inspect the terrain by layer. - Zoom and pan around the map. - Create a new SuperPoint directly from a map cell. - Draw a route by clicking on the geodata. - Drag existing points to new positions. - Automatically snap 'X/Y' to the selected geo cell. - Use the selected geodata layer to fill the point 'Z'. - See all routes on the map or focus only on the selected one. This is especially useful when building new NPC movement paths or correcting bad route coordinates.   ### Connections and Paths   SuperPoint connections are directional. A connection from point '3' to point '2' is not the same as a connection from point '2' to point '3'. The editor makes this explicit by separating: - route points, - directed connections, - and the actual path records used by each connection. For simple cases, it can create direct path records automatically. For more complex movement, you can edit the path points manually. ### Built for Safe Editing The editor includes validation before saving, so common structural problems can be caught before a broken BIN is produced. It also verifies rebuilt BIN files through the converter engine. The goal is simple: edit quickly, but do not silently damage server data.   ### Unknown Field   This small 'Unknown' field is part of the original BIN structure. Most official-looking files keep it as '0', and for regular route editing there is usually no reason to change it. The editor exposes it so nothing from the BIN is hidden or lost. If you do not know exactly what your server uses it for, keep it at '0'. Download
    • NpcGrp não salva no interlúdio e da crítico quando coloca ele no cliente, já testei ele antes.
  • Topics

×
×
  • Create New...

Important Information

This community uses essential cookies to function properly. Non-essential cookies and third-party services are used only with your consent. Read our Privacy Policy and We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue..