private void moveWithKeyboard(){
        String key = Greenfoot.getKey();
        if(isTouching(Environment.class)){
            setLocation(50,50);
        }
        else{
            if (key ==null) return;

            if (Greenfoot.isKeyDown("w")){
                // move forward
                turn(-90);
                //setRotation(90);
                move(10);
                turn(90);

            }
            else if(Greenfoot.isKeyDown("s")){

                //setRotation(270);
                turn(-90);
                move(-10);
                turn(90);

            }
            else if(Greenfoot.isKeyDown("a")){
                turn(-10);

            }
            else if(Greenfoot.isKeyDown("d")){
                turn(10);

            } 
            animation();
        }

    }