private void toggleCellHint(int row, int col, int hint) { Cell cell = board.getCell(row, col); // not allow to toggle hint when cell is holding value if (cell.isEmpty() == false) { return; } boolean isAdding = !board.getCell(row, col).getHints().contains(hint); Step step = isAdding ? board.addCellHint(row, col, hint) : board.subCellHint(row, col, hint); steps.push(step); boardView.getCellView(row, col).toggleHint(hint, isAdding); }