public void paint(Graphics g) {
		super.paint(g);
		// Set background colour.
		g.setColor(new Color(250, 240, 170));
		g.fillRect(0, 0, this.getWidth(), this.getHeight());

		// Add all the objects to an array to loop over.
		ArrayList<Sprite> world = new ArrayList<Sprite>();
		world.addAll(trees);
		world.addAll(ships);
		world.addAll(water);
		world.addAll(goals);
		world.addAll(chests);
		world.add(player);

		// Loop over all objects in this world.
		for (int i = 0; i < world.size(); i++) {

			Sprite item = world.get(i);

			if ((item instanceof Player) || (item instanceof Treasure)) {
				g.drawImage(item.getImage(), item.getX() + 2, item.getY() + 2,
						this);
			} else {
				g.drawImage(item.getImage(), item.getX(), item.getY(), this);
			}

			// If the player is out of time, they are also finished.
			if (outOfTime)
				finished = true;

			// Add text that will be shown all the time.
			Graphics2D g2d = (Graphics2D) g;
			g2d.setColor(Color.BLACK);
			g2d.setFont(new Font("Verdana", Font.BOLD, 24));
			g2d.drawString(sdf.format(new Date(timeRemaining)),
					BOARD_WIDTH - 150, OFFSET * 8);

			g2d.drawString(currentScore + "/" + goals.size(),
					BOARD_WIDTH / 2 - 25, OFFSET * 8);
			
			//Only show restart message during game.
			if(!finished){
				g2d.drawString("Press R to restart.", 700, BOARD_HEIGHT - 40);
			}
			
			// Extra text and commands to do if the player has finished.
			if (finished) {
				// Stop the song and timer.
				SoundEffect.SONG.stoploop();
				timer.stop();

				// End game text.
				g2d.setColor(Color.BLACK);
				g2d.setFont(new Font("Verdana", Font.BOLD, 48));
				g2d.drawString("Game Over", 150, BOARD_HEIGHT / 2);
				// Extra text for out of time message.
				if (outOfTime)
					g2d.drawString("Out of Time", 150, BOARD_HEIGHT / 2 + 50);

				// Recognition.
				g2d.setColor(Color.BLACK);
				g2d.setFont(new Font("Verdana", Font.BOLD, 24));
				g2d.drawString("Game made by Bowen Hui and Rodney Earl",
						OFFSET, BOARD_HEIGHT - 160);
				g2d.drawString("Images by Rodney Earl", OFFSET,
						BOARD_HEIGHT - 130);
				g2d.drawString("and Duncan Szarmes", OFFSET, BOARD_HEIGHT - 100);
				g2d.drawString("Music from Kevin MacLeod", OFFSET,
						BOARD_HEIGHT - 70);
				g2d.drawString("Sound effects from MediaCollege.com", OFFSET,
						BOARD_HEIGHT - 40);
			}

		}
	}