public void act(){
        if (!restart){                              //if its not restarting
            checkInput (stage);
            map.s.playMenu();
        }else{
            if (Greenfoot.isKeyDown ("r")){
                restart = false;
                gameStart = false;
                if (win){
                    win = false;
                }
            }else if (Greenfoot.isKeyDown ("escape")){
                map.s.stop();
                Greenfoot.stop();
            }
        }
        refresh();     
    }