|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgame.Controller
public class Controller
As the primary controller of the game, this class provides hooks to control the game's components. It is separated from actual mouse events and such which are handled by Main.
| Field Summary | |
|---|---|
static int |
numBricksHoriz
|
static int |
numBricksVert
|
| Constructor Summary | |
|---|---|
Controller(nip.GraphicsPanel panel)
|
|
| Method Summary | |
|---|---|
void |
genBall()
Generate a new Ball that starts at some random spot |
void |
setPaddle(lab4.Point p)
Set the Paddle to the specified destination. |
void |
start()
Starts the Clock ticking continuously. |
void |
stop()
Halts the continuous ticking of the Clock. |
void |
tick(int numTicks)
Called by a mouseClick from Main, this steps the game some number of ticks. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int numBricksHoriz
public static final int numBricksVert
| Constructor Detail |
|---|
public Controller(nip.GraphicsPanel panel)
| Method Detail |
|---|
public void genBall()
public void start()
public void stop()
public void setPaddle(lab4.Point p)
p - public void tick(int numTicks)
numTicks - the number of ticks to step the game
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||