@Override
    public void keyReleasedFramework(KeyEvent e) {
        switch (gameState) {
            case MAIN_MENU:
                //the user can press any key to start the game, when a key
                //any key is released the game starts
                newGame();
                break;
            case GAMEOVER:
                //if the user hits one of these keys, start a new game
                if (e.getKeyCode() == KeyEvent.VK_SPACE || e.getKeyCode() == KeyEvent.VK_ENTER) {
                    restartGame();
                }
                break;
        }
    }