Section 2

Congratulations, you've finished Section 2. To make it easy to verify your progress I've included here an "inventory" of the classes and methods related to this Laser Game development that you should have in your Squeak image at this point.

System Category Class Name Defined Instance Methods Class Methods
Kernel-Objects Object   revisit:  
Laser-Game-Graphics BlankCellRenderer Yes    
Laser-Game-Graphics BlankCellRenderer     modelClass
Laser-Game-Graphics CellRenderer Yes    
Laser-Game-Graphics CellRenderer   cellLocation cellExtent
Laser-Game-Graphics CellRenderer   cellLocation: rendererFor:
Laser-Game-Graphics CellRenderer   grid rendererFor:grid:form:
Laser-Game-Graphics CellRenderer   grid:  
Laser-Game-Graphics CellRenderer   offsetWithinGridForm  
Laser-Game-Graphics CellRenderer   render  
Laser-Game-Graphics CellRenderer   renderBorder  
Laser-Game-Graphics CellRenderer   renderBorderBottom  
Laser-Game-Graphics CellRenderer   renderBorderLeft  
Laser-Game-Graphics CellRenderer   renderBorderRight  
Laser-Game-Graphics CellRenderer   renderBorderTop  
Laser-Game-Graphics CellRenderer   renderContents  
Laser-Game-Graphics CellRenderer   targetForm  
Laser-Game-Graphics CellRenderer   targetForm:  
Laser-Game-Graphics LaserGame Yes    
Laser-Game-Graphics LaserGame   boardForm boardExtentFor:
Laser-Game-Graphics LaserGame   boardForm:  
Laser-Game-Graphics LaserGame   calculatedExtent  
Laser-Game-Graphics LaserGame   drawGameBoard  
Laser-Game-Graphics LaserGame   findFireButton  
Laser-Game-Graphics LaserGame   fireButtonLabel  
Laser-Game-Graphics LaserGame   fireLaser  
Laser-Game-Graphics LaserGame   grid  
Laser-Game-Graphics LaserGame   grid:  
Laser-Game-Graphics LaserGame   initialize  
Laser-Game-Graphics LaserGame   laserActive  
Laser-Game-Graphics LaserGame   makeButton:action:state:  
Laser-Game-Graphics LaserGame   makeControlPanelMorph  
Laser-Game-Graphics LaserGame   makeFireLaserButton  
Laser-Game-Graphics LaserGame   makeGameBoardMorph  
Laser-Game-Graphics LaserGame   makeQuitGameButton  
Laser-Game-Graphics LaserGame   panelWidth  
Laser-Game-Graphics LaserGame   quitGame  
Laser-Game-Graphics LaserGame   setExtent  
Laser-Game-Graphics LaserGame   setupMorphs  
Laser-Game-Graphics LaserGame   updateFireButtonLabel  
Laser-Game-Graphics LaserGameColors Yes    
Laser-Game-Graphics LaserGameColors     cellBorderColor
Laser-Game-Graphics LaserGameColors     gameBoardBackgroundColor
Laser-Game-Graphics LaserGameColors     mirrorColor
Laser-Game-Graphics LaserGameColors     targetCenterColor
Laser-Game-Graphics LaserGameColors     targetCenterColorActive
Laser-Game-Graphics LaserGameColors     targetCenterColorIdle
Laser-Game-Graphics MirrorCellRenderer Yes    
Laser-Game-Graphics MirrorCellRenderer   cornerInset modelClass
Laser-Game-Graphics MirrorCellRenderer   renderContents  
Laser-Game-Graphics MirrorCellRenderer   renderContentsLeanLeft  
Laser-Game-Graphics MirrorCellRenderer   renderContentsLeanRight  
Laser-Game-Graphics TargetCellRenderer Yes    
Laser-Game-Graphics TargetCellRenderer   drawCircleOutline modelClass
Laser-Game-Graphics TargetCellRenderer   drawCrossHairsOutlines  
Laser-Game-Graphics TargetCellRenderer   drawTargetOutlines  
Laser-Game-Graphics TargetCellRenderer   renderContents  
Laser-Game-Graphics TargetCellRenderer   renderContentsOff  
Laser-Game-Graphics TargetCellRenderer   renderContentsOn  
Laser-Game-Graphics TargetCellRenderer   renderInnerCircleColor:  
Laser-Game-Model BlankCell Yes    
Laser-Game-Model BlankCell   initialize  
Laser-Game-Model BlankCell   initializeExitSides  
Laser-Game-Model Cell Yes    
Laser-Game-Model Cell   activeSegments  
Laser-Game-Model Cell   activeSegments:  
Laser-Game-Model Cell   clearCell  
Laser-Game-Model Cell   exitSideFor:  
Laser-Game-Model Cell   exitSides  
Laser-Game-Model Cell   exitSides:  
Laser-Game-Model Cell   gridLocation  
Laser-Game-Model Cell   gridLocation:  
Laser-Game-Model Cell   initialize  
Laser-Game-Model Cell   initializeActiveSegments  
Laser-Game-Model Cell   isOff  
Laser-Game-Model Cell   isOn  
Laser-Game-Model Cell   isSegmentOnFor:  
Laser-Game-Model Cell   laserEntersFrom:  
Laser-Game-Model Grid Yes    
Laser-Game-Model Grid   activateCellsInPath newOfSize:
Laser-Game-Model Grid   at:  
Laser-Game-Model Grid   at:put:  
Laser-Game-Model Grid   calculatePath  
Laser-Game-Model Grid   cells  
Laser-Game-Model Grid   cells:  
Laser-Game-Model Grid   clearCellsInPath  
Laser-Game-Model Grid   fireLaser  
Laser-Game-Model Grid   initialize  
Laser-Game-Model Grid   initializeCells  
Laser-Game-Model Grid   laserBeamPath  
Laser-Game-Model Grid   laserBeamPath:  
Laser-Game-Model Grid   laserIsActive  
Laser-Game-Model Grid   laserIsActive:  
Laser-Game-Model Grid   numberOfColumns  
Laser-Game-Model Grid   numberOfColumns:  
Laser-Game-Model Grid   numberOfRows  
Laser-Game-Model Grid   numberOfRows:  
Laser-Game-Model Grid   startingCell  
Laser-Game-Model Grid   stopLaser  
Laser-Game-Model GridDirection Yes    
Laser-Game-Model GridDirection     directionFor:
Laser-Game-Model GridDirectionEast Yes    
Laser-Game-Model GridDirectionEast     adjacentInversionSymbol
Laser-Game-Model GridDirectionEast     directionSymbol
Laser-Game-Model GridDirectionEast     vector
Laser-Game-Model GridDirectionNorth Yes    
Laser-Game-Model GridDirectionNorth     adjacentInversionSymbol
Laser-Game-Model GridDirectionNorth     directionSymbol
Laser-Game-Model GridDirectionNorth     vector
Laser-Game-Model GridDirectionSouth Yes    
Laser-Game-Model GridDirectionSouth     adjacentInversionSymbol
Laser-Game-Model GridDirectionSouth     directionSymbol
Laser-Game-Model GridDirectionSouth     vector
Laser-Game-Model GridDirectionWest Yes    
Laser-Game-Model GridDirectionWest     adjacentInversionSymbol
Laser-Game-Model GridDirectionWest     directionSymbol
Laser-Game-Model GridDirectionWest     vector
Laser-Game-Model GridFactory Yes    
Laser-Game-Model GridFactory     demoGrid
Laser-Game-Model LaserPathElement Yes    
Laser-Game-Model LaserPathElement   activateCell cell:entrySide:
Laser-Game-Model LaserPathElement   cell  
Laser-Game-Model LaserPathElement   cell:  
Laser-Game-Model LaserPathElement   clearCell  
Laser-Game-Model LaserPathElement   entrySide  
Laser-Game-Model LaserPathElement   entrySide:  
Laser-Game-Model LaserPathElement   nextElementIn:  
Laser-Game-Model MirrorCell Yes    
Laser-Game-Model MirrorCell   initialize leanLeft
Laser-Game-Model MirrorCell   initializeExitSides leanRight
Laser-Game-Model MirrorCell   isLeft  
Laser-Game-Model MirrorCell   isRight  
Laser-Game-Model MirrorCell   leanLeft  
Laser-Game-Model MirrorCell   leanRight  
Laser-Game-Model MirrorCell   leansLeft  
Laser-Game-Model MirrorCell   leansLeft:  
Laser-Game-Model TargetCell Yes    
Laser-Game-Model TargetCell   initialize  
Laser-Game-Model TargetCell   initializeExitSides  
Laser-Game-Tests BlankCellTestCase Yes    
Laser-Game-Tests BlankCellTestCase   testCellExitSides  
Laser-Game-Tests BlankCellTestCase   testCellLaserActivity  
Laser-Game-Tests BlankCellTestCase   testCellOnState  
Laser-Game-Tests BlankCellTestCase   testCellSegmentsState  
Laser-Game-Tests CellRendererTestCase Yes    
Laser-Game-Tests CellRendererTestCase   testCellOffsetCalculations  
Laser-Game-Tests CellRendererTestCase   testRenderSelection  
Laser-Game-Tests GridDirectionTestCase Yes    
Laser-Game-Tests GridDirectionTestCase   testDirectionSelection  
Laser-Game-Tests GridTestCase Yes    
Laser-Game-Tests GridTestCase   generateDemoGrid  
Laser-Game-Tests GridTestCase   testCellInteractions  
Laser-Game-Tests GridTestCase   testFireLaser  
Laser-Game-Tests GridTestCase   testInitialConditions  
Laser-Game-Tests GridTestCase   testNonDefaultGridSizeConditions  
Laser-Game-Tests GridTestCase   testStopLaser  
Laser-Game-Tests GridTestCase   testToggleLaser  
Laser-Game-Tests MirrorCellTestCase Yes    
Laser-Game-Tests MirrorCellTestCase   testCellExitSidesMirrorLeft  
Laser-Game-Tests MirrorCellTestCase   testCellExitSidesMirrorRight  
Laser-Game-Tests MirrorCellTestCase   testCellLaserActivityMirrorLeft  
Laser-Game-Tests MirrorCellTestCase   testCellLaserActivityMirrorRight  
Laser-Game-Tests MirrorCellTestCase   testCellOnState  
Laser-Game-Tests MirrorCellTestCase   testCellSegmentsState  
Laser-Game-Tests TargetCellTestCase Yes    
Laser-Game-Tests TargetCellTestCase   testCellExitSides  
Laser-Game-Tests TargetCellTestCase   testCellLaserActivity  
Laser-Game-Tests TargetCellTestCase   testCellOnState  
Laser-Game-Tests TargetCellTestCase   testCellSegmentsState  

A Change Set of the work up to and including this section is available here . If you've been carefully following along, you do not need the Change Set. If you think you have gotten completely lost, you can open up a File List in Squeak and, after downloading the Change Set, file-in the Change Set to install the proper code.

Index Page Next Page

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