projects
/
pseudoku.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Improved solving; should now solve all easy puzzles.
[pseudoku.git]
/
pseudoku
/
__init__.py
diff --git
a/pseudoku/__init__.py
b/pseudoku/__init__.py
index
853904b
..
c7a803b
100644
(file)
--- a/
pseudoku/__init__.py
+++ b/
pseudoku/__init__.py
@@
-1,4
+1,5
@@
from grid import Grid
from grid import Grid
+from grid.constraints import Diagonal
import render.text
def main():
import render.text
def main():
@@
-14,6
+15,9
@@
def main():
1...6...9
""")
1...6...9
""")
+ grid.add_constraint(Diagonal(grid, direction='down', offset=0))
+ grid.add_constraint(Diagonal(grid, direction='up', offset=0))
+
r = render.text.AsciiArtGridRenderer()
print r.render_grid(grid)
r = render.text.AsciiArtGridRenderer()
print r.render_grid(grid)