public void drawBullets(Graphics graphics) {
        for (int i=0; i<bulletsInPlay.size(); i++) {
            graphics.setColor(Color.red);
            bulletsInPlay.get(i).move();
            // if bullet is out of play
            if (bulletsInPlay.get(i).getX() >= 600 || bulletsInPlay.get(i).getX() <= 0 || bulletsInPlay.get(i).getY() >= 600 || bulletsInPlay.get(i).getY() <= 0) {
                explosions.add (new Explosion(bulletsInPlay.get(i).getX(), bulletsInPlay.get(i).getY()));
                bulletsInPlay.remove(i);
            } else {
                graphics.drawPolygon(bulletsInPlay.get(i).getBulletShape());
                detectBulletCollision(bulletsInPlay.get(i));
            }
        }
        detectInput();
    }