Can someone give me accurate code that will allow me to move my wombats using key control, thank you


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | //this goes in your wombat class public void act() { moveandturn(); } public void moveandturn() { if (Greenfoot.isKeyDown( "//keyyouwant\\" ) { move( 4 ); //or\\ turn( 3 ); } } |