Class DimpleCanvas
Class DimpleCanvas
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----HilitCanvas
|
+----DimpleCanvas
- class DimpleCanvas
- extends HilitCanvas
- implements DecoderConstants
A class which literally contains the dimples on the board. These
dimples are filled with marbles, column by column, as the player
attempts to match the computer's marbles. As an extension of HilitCanvas,
the dimples will react to mouse movement.
Marbles added to the dimples will also be stored in an array of
Guess objects. This class performs all scoring functions.
-
mouseDown(Event, int, int)
- The main form of interaction with the board.
-
update(Graphics)
- Repaints without clearing.
mouseDown
public boolean mouseDown(Event e,
int x,
int y)
- The main form of interaction with the board. Clicks cause marbles
to be placed down or removed. If the new marble fills a column, the
column is automatically scored.
- Overrides:
- mouseDown in class HilitCanvas
update
public void update(Graphics g)
- Repaints without clearing. (Highlighted and
non-highlighted images are the same size for this
class.)
- Overrides:
- update in class Component