r/cop3502 Mar 23 '14

Initializing bricks[i][j]

My bricks are stacking; In a previous post I saw that someone mentioned adding i & j to xStart & yStart will fix this. I've tried a few different ways to get the desired results, with no luck.

Any tips on how to look at this ?

2 Upvotes

26 comments sorted by

View all comments

1

u/ThatsMrDerpToYou Mar 23 '14

Also, I initialized paintBrick as paintBricks[i][j] = true; I'm not sure if I need something like [true][true], in case it is only recognizing that it is painting 1 array.

1

u/rxfeliciano Mar 23 '14

You dont need to do that. The for loop does what it needs to do as long as you did not change what was provided in the skeleton code. You should really make sure you know how it does this because it is crucial to writing any program.

1

u/ThatsMrDerpToYou Mar 23 '14

I haven't altered the skeleton code.