public void paint(Graphics g) {
        super.paint(g);
        if(!started) {Font small = new Font("Helvetica", Font.ROMAN_BASELINE, 20);
        FontMetrics metr = g.getFontMetrics(small);

        String msg = "PRESS SPACE";
        g.setColor(new Color(255, 255, 255));
        g.setFont(small);
        g.drawString(msg, (800/2 - (metr.stringWidth(msg)) / 2),
                     (250));}
        else if(ended) {Font small = new Font("Helvetica", Font.ROMAN_BASELINE, 20);
        FontMetrics metr = g.getFontMetrics(small);

        String msg = winner + " WINS! PRESS SPACE TO START";
        g.setColor(new Color(255, 255, 255));
        g.setFont(small);
        g.drawString(msg, (800/2 - (metr.stringWidth(msg)) / 2),
                     (250));}
        else{
        	g.drawImage(sky, 0, 0, this);
	        g.drawImage(p1.getImage(), p1.x, p1.y, this);
	        g.drawImage(p2.getImage(), p2.x, p2.y, this);
	        for(int i = 0; i < bullets.size(); i++)
	        {
	        	Bullet b = bullets.get(i);
	        	if(b.getBounds().intersects(p2.getBounds())){ winner = "P1"; ended = true;}
	        	if(b.getBounds().intersects(p1.getBounds())){ winner = "P2"; ended = true;}
	        	g.drawImage(b.myImage, b.x, b.y, this);
	        	b.doStuffs();
	        	if(b.x < 0)bullets.remove(i);
	    		if(b.x > 800)bullets.remove(i);
	        }
	        p1.doStuffs();
	        p2.doStuffs();
        }
		Toolkit.getDefaultToolkit().sync();
        g.dispose();
    }