|
Adding high score to frogger.
Open up your frogger or tjs - frogger
Go to the notes here and add HighScore class to your project.
Convert it to Frogger to JFrame and add the following lines of code (I already did it for those w/ TJs code above):
public static void main (String[] args)
{
Frogger f = new Frogger();
f.init();
f.start();
f.setSize(520,520);
f.setVisible(true);
}
Everybody:
- add high score at the top
Advanced:
- Have it pop up and ask for your name only if you have set the new high score.
- have a popup appear and say the persons rank, like 3/5. See if you can make it say make it say You scored 3 out of 5 people
This works online, you can put it online in the dump. You can change it back to a JApplet and put it in the dump. Either put both classes in, or make a jar out of it, then submit as jar.
|