public void update() {

        for (GameObject go : objects) {
            go.update();
        }
        if (ball.getxPos() > Display.getWidth()) {
            playerScore++;
            ball.resetPosition();
        } else if (ball.getxPos() < 0) {
            enemyScore++;
            ball.resetPosition();
        }
    }