Emails are disabled - for account issues, post in #help on the NI Discord.

1.9.3 Client Release
#8
(17-03-2018, 10:05 AM)Kaasovic Wrote:
Code:
players_alive * 10
players_alive_threshold = players_alive * 8
players_alive_threshold_mod = players_alive_threshold mod 100
players_alive_threshold /= 100
if players_alive_threshold_mod => 50
     players_alive_threshold += 1

You should use a ternary conditional operator to simplify this in processing time, memory, and code readability.

Code:
players_alive_threshold = players_alive * 4 / 5
players_alive_threshold = ((players_alive_threshold mod 100) / 100) >= 50 ? players_alive_threshold + 1 : players_alive_threshold;
Voted Friendliest NordInvasion Player

Quote Board is on Discord (last updated 2025.02.02)
"When I feel bad, I read your quote board." - Corndog

Nka: You’re playing it smart, always [using] logic, and they get pissed.
Kaasovic: God, this guy is unbeatable. I feel defeated in every verbal argument we end up in. Good job, Sir.
Odi: Hasn’t [PCK beaten] the game at this point?
Reply


Messages In This Thread
1.9.3 Client Release - by Winter - 17-03-2018, 03:26 AM
RE: 1.9.3 Client Release - by Cherry - 17-03-2018, 03:27 AM
RE: 1.9.3 Client Release - by TerrorBite - 17-03-2018, 04:22 AM
RE: 1.9.3 Client Release - by Black_Kitten* - 17-03-2018, 08:22 AM
RE: 1.9.3 Client Release - by Kaasovic - 17-03-2018, 10:05 AM
RE: 1.9.3 Client Release - by Malong - 17-03-2018, 12:49 PM
RE: 1.9.3 Client Release - by Black_Kitten* - 18-03-2018, 05:01 AM
RE: 1.9.3 Client Release - by Julia. - 17-03-2018, 10:40 AM
RE: 1.9.3 Client Release - by Kaasovic - 17-03-2018, 10:48 AM
RE: 1.9.3 Client Release - by bluzark - 17-03-2018, 03:44 PM
RE: 1.9.3 Client Release - by DR. - 17-03-2018, 03:52 PM
RE: 1.9.3 Client Release - by Ken_Repeaterman - 18-03-2018, 05:37 PM
RE: 1.9.3 Client Release - by Coconut - 18-03-2018, 09:51 PM
RE: 1.9.3 Client Release - by DR. - 19-03-2018, 10:17 AM
RE: 1.9.3 Client Release - by Sir Baron - 21-03-2018, 03:00 PM



Users browsing this thread: 8 Guest(s)