public abstract class Game
extends java.lang.Object
| Constructor and Description |
|---|
Game(int maxRows,
int maxCols)
Defines a board with BoardCell.EMPTY cells.
|
| Modifier and Type | Method and Description |
|---|---|
BoardCell |
getBoardCell(int rowIndex,
int colIndex) |
int |
getMaxCols() |
int |
getMaxRows() |
abstract int |
getScore() |
abstract boolean |
isGameOver() |
abstract void |
nextAnimationStep()
Advances the animation one step.
|
abstract void |
processCell(int rowIndex,
int colIndex)
Adjust the board state according to the current board state and the
selected cell.
|
void |
setBoardCell(int rowIndex,
int colIndex,
BoardCell boardCell) |
void |
setBoardWithColor(BoardCell cell)
Initializes the board with the specified color.
|
void |
setColWithColor(int colIndex,
BoardCell cell)
Initializes column with the specified color.
|
void |
setRowWithColor(int rowIndex,
BoardCell cell)
Initializes row with the specified color.
|
public Game(int maxRows,
int maxCols)
maxRows - maxCols - public int getMaxRows()
public int getMaxCols()
public void setBoardCell(int rowIndex,
int colIndex,
BoardCell boardCell)
public BoardCell getBoardCell(int rowIndex, int colIndex)
public void setRowWithColor(int rowIndex,
BoardCell cell)
rowIndex - cell - public void setColWithColor(int colIndex,
BoardCell cell)
colIndex - cell - public void setBoardWithColor(BoardCell cell)
cell - public abstract boolean isGameOver()
public abstract int getScore()
public abstract void nextAnimationStep()
public abstract void processCell(int rowIndex,
int colIndex)
rowIndex - colIndex -