Jan-Ken-Poï

To content | To menu | To search

Friday 2 December 2011

Sudokuki - essential sudoku game

Sudokuki is a graphical sudoku game that solves the most difficult sudoku grids for you, allows you to generate a sudoku, print one or four grids, play... At the moment, Sudokuki is available in 10 languages.


visit Sudokuki project page

Sudokuki is Free Software. Just dowload and play for fun!


Thursday 13 October 2011

Prettyprint, code beautifier

public boolean setCellValueAt(int li, int co, byte value) {
    System.out.println("GridShadow.setCellValueAt(" + li + "," + co + "=>" + value + ")");
    cellFlags[offset + 9 * li + co] &= ~MASK_FOR_CURRENT_VALUE;
    cellFlags[offset + 9 * li + co] |= FLAG_CELL_READ_ONLY | value;
    // ligne
    for (int c = 0; c < 9; c++) {
        if (c != co) {
            if (!isCellFilled(li, c) && isCellValuePossible(li, c, value)) {
                unsetCellValuePossible(li, c, value);
                setCellValueScreened(li, c, value);
                if (getNumberOfPossibleValues(li, c) == 0) {
                    /* DEAD END */
                    return true;
                }
            }
        }
    }

...