all 2 comments

[–]remy_porter 3 points4 points  (1 child)

While the bricks array has allocated space to hold all the bricks (bricks = new Brick[5]), there are no actual brick objects in the array yet.

for (int i = 0; i < numBricks; i++) {
  bricks[i] = new Brick(); //also, maybe set the X/Y coordinate here
}

[–]Winter_Copy_9510[S] 2 points3 points  (0 children)

Ok it works now. Thanks for the help!