Question: Objective Modify the drawing panel paint logic so that the drawing panel will show living and dead cells. Instructions It's now necessary to revisit the

Objective Modify the drawing panel paint logic so that the drawing panel will show living and dead cells. Instructions It's now necessary to revisit the paint handler method in the drawing panel in order to figure out which squares should be filled in and which should not. Just before each rectangle is drawn, the corresponding bool from the game board needs to be checked to see if it is true or false. If the bool is true, SetBrush should be set to *wxLIGHT_GREY. If the bool is false, SetBrush should be set to *wxWHITE. The iterator from each for loop can be used as an index for one of the square brackets. Since the game board is a vector of vectors, it will have two sets of square brackets. ex: variable[x][y]. Once the iterator is linked to the correct index, clicking on a square should change its color

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Law Questions!