- #1
the other guy
- 19
- 0
Hi, I'm trying to get it so that when the program initiates, if the random number is greater than 3, I turn left. here is what I have in summary;
int rt=3;
Random ra = new Random();
for (int c = 6; c <12; ++c);
{
}
if(rt<ra)
{
Rbot.turnLeft();
}
the error says; operator < cannot be applied to int,java.util.Random
if this is the case, how can i get use the random number generator toward my end? I want the random number generator to be the source of "randomly occurring actions" for my robot.
int rt=3;
Random ra = new Random();
for (int c = 6; c <12; ++c);
{
}
if(rt<ra)
{
Rbot.turnLeft();
}
the error says; operator < cannot be applied to int,java.util.Random
if this is the case, how can i get use the random number generator toward my end? I want the random number generator to be the source of "randomly occurring actions" for my robot.