Section 3

We want to draw the arrows now instead of logging text to the Transcript. Go back and modify the method that showed our hint text. For now, just answer the push region.

The mirror cell renderer is the only one that handles hints. Change it so use the answered push region. If there was no push region (nil) then exit, we have nothing to do.

Asking the push region for the correct arrow form is straight-forward.

All we need to do now is ask the push region for its arrow form. Before we use it we remember that the arrow form given is a very large black and white "mask" for an arrow and cannot be used directly on our game board.

We make a scaled down version of the arrow that's just a few pixels smaller than the cell. The relative position of the cell is also known so we add a temporary variable and obtain that as well. Now before we draw our tiny arrow onto the game board I want to proceed with caution.

Index Page Next Page

Copyright © 2007, 2008, 2009, 2010 Stephan B Wessels    stevewessels@me.com