int cellDestX = cellOrigX + cellWidthDraw;
int cellDestY = cellOrigY + cellHeightDraw;
Paint currentGradient = Color.WHITE;
PlayerMark mark = playerMarks[i][j];
if (mark != null)
currentGradient = PlayerColorRepresentation.valueOf(mark).getPlayerPaint(cellOrigX, cellOrigY, cellDestX, cellDestY);
g2d.setPaint(currentGradient);
g2d.fillOval(cellOrigX, cellOrigY, cellWidthDraw, cellHeightDraw);
}
}
// Marks the last inserted chip differently
// in case the game is running.
if (gameModel.getGameStatus().equals(GameStatus.CONTINUE_STATUS) && lastInsertedCell != null)
{
// The circle mark width.
final int CIRCLE_WIDTH = 3;
// The circle color : a kind of green.
final Color CIRCLE_COLOR = new Color(0, 255, 100);
int j = lastInsertedCell.getColIndex();
int i = lastInsertedCell.getRowIndex();
g2d.setColor(CIRCLE_COLOR);
g2d.fillOval(cellWidth * j + CELL_BORDER_WIDTH, cellHeight * i + CELL_BORDER_WIDTH, cellWidthDraw, cellHeightDraw);
PlayerMark mark = playerMarks[i][j];
g2d.setPaint(PlayerColorRepresentation.valueOf(mark).getPlayerPaint(cellWidth * j + CELL_BORDER_WIDTH, cellHeight * i + CELL_BORDER_WIDTH,
cellWidth * (j + 1) - CELL_BORDER_WIDTH, cellHeight * (i + 1) - CELL_BORDER_WIDTH));
g2d.fillOval(cellWidth * j + CIRCLE_WIDTH + CELL_BORDER_WIDTH, cellHeight * i + CIRCLE_WIDTH + CELL_BORDER_WIDTH, cellWidthDraw - 2 * CIRCLE_WIDTH, cellHeightDraw - 2 * CIRCLE_WIDTH);
}