R
rckildea
I'm writing a code, and to save space I'm wondering how I could do
this. There's no easy way to do this so I'll just give an example:
int blueCoins = playerBlueCoins;
int redCoins = playerRedCoins;
int greenCoins = playerGreenCoins;
//...and so on...
Is there some way for me to say "If the value of any of these ints is
greater than 99, the value is 99" without having to write it for every
single int?
this. There's no easy way to do this so I'll just give an example:
int blueCoins = playerBlueCoins;
int redCoins = playerRedCoins;
int greenCoins = playerGreenCoins;
//...and so on...
Is there some way for me to say "If the value of any of these ints is
greater than 99, the value is 99" without having to write it for every
single int?