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

2020/8/31

Greenfoot code

Sauravbasyalking12 Sauravbasyalking12

2020/8/31

#
What code need to be used in this create and addten (10)Foodobjects to the world in a horizontal line. The starting position of the first Food object should be set to 100pixels from the left and 40from the top of the World. Make x increaseby 40 pixelsfor each new Food object created,
Kostya20052011 Kostya20052011

2020/8/31

#
int x=100; int y=40; for(int i=0; i<10; i++){ Food f=new Food(); addObject(f, x, y); x+=40; }
Thank you so much kostya
You need to login to post a reply.