Squeak Class Documentation category index | class index  
 
Tetris
  category: Morphic-Games
  superclass: AlignmentMorph
  subclasses:

This is a port of JTetris.java 1.0.0.

How to start:
choose new morph.../Games/Tetris

How to play:
1) using buttons
2) using keyboard:
drop - spacebar
move to left - left arrow
move to right - right arrow
rotate clockwise - up arrow
rotate anticlockwise - down arrow
NOTE: mouse must be over Tetris

instance methods
  access
 

  events
  handlesKeyboard:
handlesMouseOver:
keyStroke:
mouseEnter:
score:

  initialization
  buildButtonTarget:label:selector:help:
initialize
makeGameControls
makeMovementControls
rowForButtons
showScoreDisplay
wrapPanel:label:

class methods
  as yet unclassified
  colors

  parts bin
  descriptionForPartsBin

instance methods
  access top  

  events top  
 

handlesKeyboard:

Return true if the receiver wishes to handle the given keyboard event


 

handlesMouseOver:

Do I want to receive mouseEnter: and mouseLeave: when the button is up and the hand is empty? The default response is false, except if you have added sensitivity to mouseEnter: or mouseLeave:, using the on:send:to: mechanism.


 

keyStroke:

Handle a keystroke event. The default response is to let my eventHandler, if any, handle it.


 

mouseEnter:

Handle a mouseEnter event, meaning the mouse just entered my bounds with no button pressed. The default response is to let my eventHandler, if any, handle it.


 

score:


  initialization top  
 

buildButtonTarget:label:selector:help:


 

initialize


 

makeGameControls


 

makeMovementControls


 

rowForButtons


 

showScoreDisplay


 

wrapPanel:label:

wrap an LED panel in an alignmentMorph with a label to its left


class methods
  as yet unclassified top  
 

colors


  parts bin top  
 

descriptionForPartsBin

If the receiver is a member of a class that would like to be represented in a parts bin, answer the name by which it should be known, and a documentation string to be provided, for example, as balloon help. When the 'nativitySelector' is sent to the 'globalReceiver', it is expected that some kind of Morph will result. The parameters used in the implementation below are for documentation purposes only!