Section 4

And now the part that pulls it all together.

renderLaser
    | horizontal |
    self cell isOff ifTrue: [^self].
    horizontal := (self cell activeSegments at: #east) or: [self cell activeSegments at: #west].
    horizontal
        ifTrue: [self renderLaserHorizontal]
        ifFalse: [self renderLaserVertical].
    self drawTargetOutlines.
    self renderContentsOn.

Fire up the laser and test it out.

Index Page Next Page

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