|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--net.percederberg.tetris.Game
The Tetris game. This class controls all events in the game and handles all the game logics. The game is started through user interaction with the graphical game component provided by this class.
Constructor Summary | |
Game()
Creates a new Tetris game. |
|
Game(int width,
int height)
Creates a new Tetris game. |
Method Summary | |
java.awt.Component |
getComponent()
Returns a new component that draws the game. |
void |
quit()
Kills the game running thread and makes necessary clean-up. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Game()
public Game(int width, int height)
width
- the width of the square board (in positions)height
- the height of the square board (in positions)Method Detail |
public void quit()
public java.awt.Component getComponent()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |