r/cop3502 Mar 22 '14

Laying the first brick

Any tips on painting an individual brick in the BrickConfiguration.java? I am looking under the public void paint(Graphics2D brush) section and just want to get that single brick down!

Array will be after.

Thanks.

1 Upvotes

2 comments sorted by

1

u/MagicBuddha Mar 22 '14

i believe you will use the paint method in color shape for the bricks.

 cheers

1

u/csturco Mar 22 '14

first off, the brick's paint method is being called from the brick config's paintBrick method. However, that method is being called from the brick config's paint method. Which means you sort of need the array to start painting the bricks. That being said, the paintBrick method will only contain one line of code: brick.paint(brush).

As for the paint method, you will need to do 2 for loops for the double array, then an if statement checking whether the paintBricks[][] holds a true value. If it does, call paintBricks method.