Your test for the end of the game is in the wrong place. Shouldn't it be AFTER either team scores? Other than that, great job moving things around and following simple directions!
Type: Posts; User: GregBrannon
Your test for the end of the game is in the wrong place. Shouldn't it be AFTER either team scores? Other than that, great job moving things around and following simple directions!
Then instead of a method, do this to print the score each time:
System.out.println( "Home: " + homeScore + " Away: " + awayScore );
instead of:
System.out.println(total);
See what I added to my previous post.
These statements can be improved on a couple levels:
while (homeBall = true)
'=' is the assignment operator, '==' is to compare equality. However, there's no reason to compare a boolean to...
While one type of loop might be more appropriate in a given situation than the others, ALL can be written to be interchangeable. Show what you tried and describe the results. Show the whole program...
Then you probably know that the typical loops are for loops, while loops, and do/while loops.
What "last two big loops?" I don't see a for, while, or do/while loop anywhere in your code.
You mention being new to looping, and that's exactly what you need here. Right now your program runs from top to bottom or from start to finish without repeating any of the code between. Repeating...