src/Frogger.java
/* Restart methods. Restarts all variables to their default settings at the beginning of the game. Resets all
	 * sound effects along with stopping them.
	 */
Restart methods. Restarts all variables to their default settings at the beginning of the game. Resets all
sound effects along with stopping them.
Restart methods . Restarts all variables to their default settings at the beginning of the game . Resets all sound effects along with stopping them .
public void restart()
	{
		frog.setImage(new ImageIcon("images\\frogUp.png"));
		frog.setDeath(false);
		frog.setY(527);
		frog.setX(FRAME_WIDTH/2 - frog.getWidth()/2);
		for (int i = 0; i < log.length; i++)
		{
			log[i].setLevel2(false);
		}
		for (int i = 0; i < imgFrogs.length; i++)
		{
			imgFrogs[i] = new ImageIcon("");
			frogOccupied[i] = false;
		}
		gameOver = false;
		message = "GAMEOVER";
		c1 = Color.RED;
		c = Color.GREEN;
		lvl2Pixels = 0;
		level = 1;
		stringY = -10;
		stringChoiceY = -10;
		head = 0;
		score = 0;
		frogs = 0;
		lives = 3;
		location = 370;
		width = 200;
		seconds = 47;
		imgLives = new ImageIcon("images\\lives" + lives + ".png");
	}
public void restart ( ) { frog . setImage ( new ImageIcon ( "images\\frogUp.png" ) ) ; frog . setDeath ( false ) ; frog . setY ( 527 ) ; frog . setX ( FRAME_WIDTH / 2 - frog . getWidth ( ) / 2 ) ; for ( int i = 0 ; i < log . length ; i ++ ) { log [ i ] . setLevel2 ( false ) ; } for ( int i = 0 ; i < imgFrogs . length ; i ++ ) { imgFrogs [ i ] = new ImageIcon ( "" ) ; frogOccupied [ i ] = false ; } gameOver = false ; message = "GAMEOVER" ; c1 = Color . RED ; c = Color . GREEN ; lvl2Pixels = 0 ; level = 1 ; stringY = - 10 ; stringChoiceY = - 10 ; head = 0 ; score = 0 ; frogs = 0 ; lives = 3 ; location = 370 ; width = 200 ; seconds = 47 ; imgLives = new ImageIcon ( "images\\lives" + lives + ".png" ) ; }
Restart methods.
Restart methods .