Wednesday, 16 October 2013

Hurray!

So I'm done programming the way that Ryk showed me to do it using the one category class..

But then for high scores, I don't have a clue how to program that..:3

I asked him, and he said that I had to learn sorting which is either unit 3 or unit 4 and now I'm just so confused O_O Cause there are so many different types of sorting and now I'm just kind of like, "O_O"

Anyways, to prevent the user from going below 0, I'm going to have a boolean inside each of the if statements (if it becomes zero). The default value will be false (because the default value is never zero). And it will be set to true in each if statement. At the beginning of the if statement:


if (isZero == true)
{
Display a JOptionPane asking the user whether they would like to continue or not.
if (they want to continue)
{
restart the score variable.
restart the isZero variable.
call the initialize method.
}
else
{
thank the user for playing.
System.exit(0);
}
}

No comments:

Post a Comment