public class Mediator
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private Position[][] |
cell |
private static int[] |
dx_array |
private static int[] |
dy_array |
private Position[] |
toFlip |
Constructor and Description |
---|
Mediator(Position[][] cell)
Construct a position.
|
Modifier and Type | Method and Description |
---|---|
void |
mediate(int row,
int col)
Called when position at the given row and col is clicked.
|
private Position[][] cell
private static final int[] dx_array
private static final int[] dy_array
private Position[] toFlip
public Mediator(Position[][] cell)
cell
- The array of positions of the board.public void mediate(int row, int col)
row
- the row of the clicked positioncol
- the column of the clicked position