public class GridModel
extends java.lang.Object
| Constructor and Description |
|---|
GridModel()
This constructs the model.
|
| Modifier and Type | Method and Description |
|---|---|
void |
add(int x,
int y)
Adds a position to the set of touched positions
|
boolean |
check(int x,
int y)
Retrieves whether a position has been touched.
|
void |
clear()
Clears the state of the touched positions
|
boolean |
isMatch()
Determines whether the touched positions match the pattern
set by user.
|
public boolean check(int x,
int y)
x - the x coordinate of the positiony - the y coordinate of the positionpublic void add(int x,
int y)
x - the x coordinate of the positiony - the y coordinate of the positionpublic void clear()
public boolean isMatch()