This site requires JavaScript, please enable it in your browser!
Greenfoot back
Prabhat
Prabhat wrote ...

2021/11/11

can you tell me why it is not working

Prabhat Prabhat

2021/11/11

#
if(Greenfoot.KeyDown("left"))
     {
         move(-4);
     }
    if(Greenfoot.KeyDown("right"))
     {
         move(4);
     }
    if(Greenfoot.KeyDown("down"))
     {
         turn(-4);
     }
    if(Greenfoot.KeyDown("up"))
     {
         turn(4);
    }
}
danpost danpost

2021/11/11

#
Prabhat wrote...
can you tell me why it is not working
In what way is it not working (what behavior is being exhibited)? Where is this code (what method; what class)?
You need to login to post a reply.