@Override
    protected void paintComponent(Graphics g) {


        // use all pictures from the array
        g.drawImage(backgroundImages[currentBackground % backgroundImages.length], 0, 0, null);
        g.setColor(Color.GREEN);
        g.drawString(String.format("Score: %d\t Level: %d \tLives: %d", score, level, health), 10 , 600);
        g.setColor(Color.BLUE);
        g.drawImage(ship, xShip, yShip, ship.getWidth() / 3, ship.getHeight() / 3, null);
        for (Bullet b : bullets) {
            g.drawImage(b.sprite, b.pointX, b.pointY, b.width, b.height, null);
        }
        for (EnemyBullet eb : enemyBullets) {
            g.drawImage(eb.sprite, eb.pointX, eb.pointY, eb.sprite.getWidth(), eb.sprite.getHeight(), null);
        }
        for (Enemy e : enemies) {
            g.drawImage(e.sprite, e.locX, e.locY, e.sprite.getWidth(), e.sprite.getHeight(), null);
        }
    }