It is:
not
:0
1 | Greenfoot.isKeyDown( "space" ) |
1 | isKeyDown( "space" ) |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | public void act( ) { if (place == true ){ move( 1 ); } if (place == false ){ move(- 1 ); } if (getX()> 695 ){ place = false ; } if (getX()< 455 ){ place = true ; } } |
1 2 3 4 5 6 7 8 9 | // add the following instance variable to the class int minX, maxX; // change constructor declaration to public ObjectName( int loX, int hiX) // add to the constructor minX = loX; maxX = hiX; // change 695 and 455 in your code above // to maxX and minX |
1 | new ObjectName( 455 , 695 ) |
1 2 | MoveDead move = new MoveDead( 455 , 695 ); addObject( new MoveDead( 455 , 695 ), 456 , 545 ); |
1 2 | MoveDead move = new MoveDead( 455 , 695 ); addObject(move, 456 , 545 ); |
1 | addObject( new MoveDead( 455 , 695 ), 456 , 545 ); |
1 | MoveDead move = new MoveDead( 455 , 695 ); |