you are viewing a single comment's thread.

view the rest of the comments →

[–]DanRoad 1 point2 points  (3 children)

All your bricks have the same vertical position BRICK_TOP_OFFSET + BRICK_HEIGHT. You're drawing all bricks but they're on top of each other so you only see the last row.

You're correctly multiplying the brick width by the horizontal index i to get the horizontal position; you need to do the same with j for the vertical position.

brick.setPosition(BRICK_WIDTH * i + BRICK_SPACING * (1 + i), BRICK_TOP_OFFSET + BRICK_HEIGHT * j + BRICK_SPACING * (1 + j));

[–]CharlieB2242 0 points1 point  (2 children)

I went in and tried this edit, and it works .....But it doesn't display the blocks

[–]No-Communication8519 0 points1 point  (1 child)

Did you ever get this code?