I think the problem may be more with the boolean rather than the loops. The boolean isOver should make it so once one of the dog's position is greater than or equal to the trackSize, the spinning...
Type: Posts; User: CSstudent
I think the problem may be more with the boolean rather than the loops. The boolean isOver should make it so once one of the dog's position is greater than or equal to the trackSize, the spinning...
Figured out what was wrong with spin!!!
public int spin(){
return (1+ (int)(Math.random()*5));
}
and changed the rest of my code so that there was no "int a", just spin(). So...
In reply to Norm: The issue is that it keeps giving the same output over and over forever. There are no errors. It just does not do what I intended it to.
In reply to Greg: So I could make the...
I have a Java project that is due later tonight and I can't seem to figure out why my code doesn't work.
Here is the assignment:
For this assignment, your job is to create a version of a carnival...