                 "ポリオミノが重なっています。"))
             (validate-enclosed []
               (try
-                (and (area-size board :search-8-way? true) nil)
+                (and (score result) nil)
                 (catch #+clj clojure.lang.ExceptionInfo #+cljs cljs.core.ExceptionInfo _ "ポリオミノで囲み込めていません。")))]
       (or (validate-origin)
           (validate-overlaps)


(defn score
  [result]
  (area-size (apply board result)))

  
(defn execute-programs
  [polyominos programs]
  (letfn [(execute-functions [polyomino [function & more :as functions]]
            (cons polyomino (lazy-seq (if functions
                                        (execute-functions (cond->> polyomino
                                                             function (function))
                                                           more)))))
          (execute-program [polyomino program]
            (if-not (empty? program)
              (execute-functions polyomino program)))]
