pupy.sodoku

Module Contents

exception SodokuError(message, row=None, col=None)

Bases:ValueError

simple Sodoku error

class Sodoku(board)

Bases:object

Sodoku

[ 0, 1, 2, 3, 4, 5, 6, 7, 8] [ 9, 10, 11, 12, 13, 14, 15, 16, 17] [18, 19, 20, 21, 22, 23, 24, 25, 26] [27, 28, 29, 30, 31, 32, 33, 34, 35] [36, 37, 38, 39, 40, 41, 42, 43, 44] [45, 46, 47, 48, 49, 50, 51, 52, 53] [54, 55, 56, 57, 58, 59, 60, 61, 62] [63, 64, 65, 66, 67, 68, 69, 70, 71] [72, 73, 74, 75, 76, 77, 78, 79, 80]

solve(self)
euler_096_three_digit_number(self)

Returns:

static first_unknown(d)
Args:
d:

Returns:

static unsolvable(rcbd)
Args:
rcbd:

Returns:

static check_unsolvable(d)
Args:
d:

Returns:

static update_dictionary(d)
Args:
d:

Returns:

static reduce_dictionary(d)
Args:
d:

Returns:

__str__(self)
static hasdup(d)
Args:
d:

Returns:

get_oneline_str(self)

Returns:

static neighbors(index, size=9)
Args:
index: size:

Returns:

static irow(n, bsize=9)
Args:
n: bsize:

Returns:

static icolumn(n, bsize=9)
Args:
n: bsize:

Returns:

static ibox(box_r, box_c, bsize=9)
Args:
box_r: box_c: bsize:

Returns:

static box_box(index)
Args:
index: bsize:

Returns: