The user can choose how many soldiers he want to take with him from the camp, and that amount is stored in a "int footSoldAmount". Then i need to generate a random number that will not go over the footSoldAmount that the user defined. And i cant do that with a
- Code: Select all
friendlySoldKilled = killedFriendlyRandom.nextInt(the random nuber i need);
so i wonder if anyone could help me generate a random nuber that will stop at the user defined value?
I cant get the Math.random() to work correctly if that is the way out.
Help?



