Hello,
I'm trying to create rows like the ones in the Picture
With the code below i'm able to create Level 1 (The 1st picture 9x9 Bricks).. But i'm really struggling with the other ones. Could someone help me out?
Thanks

1 2 3 4 5 6 7 8 9 10 11 12 | public void Populate( int pRows) { for ( int i= 9 ; i> 0 ; i--) { for ( int j= 0 ; j< 9 ; j++) { this .addObject( new SpaceInvader(), this .getWidth()/ 2 - 7 *SpaceInvader.WIDTH/ 2 +SpaceInvader.WIDTH*j, 75 +i*SpaceInvader.HEIGHT); } } |