Section 2

Back to the LaserGame Morph

Right now if we open the LaserGame morph, we get a little colored rectangle on the screen. Try it. From the World menu choose "new morph...". Select "from alphabetical list" and find our LaserGame in the menu.

If you didn't find LaserGame in the alphabetical morph menu list you may have not defined the class properly. Re-visit this work if you did not find it.

Command click on the morph to bring up the halos and then close it. Obviously we want to see our fancy grid instead. The morph will need a grid to work and for now let's continue to use our test grid from the grid factory. We should also add an instance variable for our form.

Create the accessors for the new variable. The #initialize method is the next place to work.

We can add the morphs we will need to make the game work. For now we know of only two. The game board morph and the laser-fire button morph. I'm going to declare some methods in advance here since I think we will be adding more morph code very soon.

Index Page Next Page

Copyright © 2007, 2008, 2009, 2010 Stephan B Wessels