aboutsummaryrefslogtreecommitdiff
path: root/dominosa.R
diff options
context:
space:
mode:
authorSimon Tatham <anakin@pobox.com>2019-04-13 13:46:31 +0100
committerSimon Tatham <anakin@pobox.com>2019-04-13 15:57:16 +0100
commit9f0dfba5fa9431469060ae89bef486267dbb23d4 (patch)
tree8022899dbf52894be8722c34a86e5937df0a09bd /dominosa.R
parentbb926f4ee4c16f67d37398c1b79b54a3fdf1dedd (diff)
downloadpuzzles-9f0dfba5fa9431469060ae89bef486267dbb23d4.zip
puzzles-9f0dfba5fa9431469060ae89bef486267dbb23d4.tar.gz
puzzles-9f0dfba5fa9431469060ae89bef486267dbb23d4.tar.bz2
puzzles-9f0dfba5fa9431469060ae89bef486267dbb23d4.tar.xz
Dominosa: add area-parity deductions, at Basic level.
This is a technique I've had on the todo list (and been using by hand) for years: a domino can't be placed if it would divide the remaining area of the grid into pieces containing an odd number of squares. The findloop subsystem is already well set up for finding domino placements that would divide the grid, and the new is_bridge query function can now tell me the sizes of the area on each side of the bridge, which makes it trivial to implement this deduction by simply running findloop and iterating over the output array.
Diffstat (limited to 'dominosa.R')
-rw-r--r--dominosa.R2
1 files changed, 1 insertions, 1 deletions
diff --git a/dominosa.R b/dominosa.R
index 568bb95..b85e7dc 100644
--- a/dominosa.R
+++ b/dominosa.R
@@ -1,6 +1,6 @@
# -*- makefile -*-
-DOMINOSA_EXTRA = laydomino dsf sort
+DOMINOSA_EXTRA = laydomino dsf sort findloop
dominosa : [X] GTK COMMON dominosa DOMINOSA_EXTRA dominosa-icon|no-icon