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;
Quote Board is on Discord (last updated 2023.09.07)
"When I feel bad, I read your quote board." - Corndog

Tofu: People call Tricksters racist, yet we have the most Muslim members of any house.
PCK: If Islam is a religion of peace, and Tricksters have the most Muslims, then is House of Tricksters the house of peace?
Falankos: I always knew that we were the good guys.
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: 1 Guest(s)