     :empty (do (dommy/remove-class! cell "cell-clicked")
                (dommy/remove-class! cell "cell-rightclicked"))))
 
+(defn update-cells-region-style! [[from-x from-y] [to-x to-y] style-fn]
+  (doseq [x (range-inc from-x to-x)
+          y (range-inc from-y to-y)
+          :let [cell (sel1 (str ".r" y ".c" x))]]
+        (change-cell-style! cell (style-fn x y))))
+
 (defn cell-style [cell]
   (cond (dommy/has-class? cell "cell-clicked") :filled
         (dommy/has-class? cell "cell-rightclicked") :crossed

  (let [wrong (check-solution)
        rows-wrong (get wrong :rows-wrong)
        cols-wrong (get wrong :cols-wrong)
        problem-def (dommy/attr (sel1 :#puzzle-table) "problem-def")
        server-id (get problem-def :id)]
    (if (and (empty? rows-wrong)
             (empty? cols-wrong))

(ns nonojure.puzzleview
  (:require
   [dommy.utils :as utils]
   [dommy.core :as dommy :refer [listen! attr]]
   [jayq.util :refer [log]])
  (:use-macros
   [dommy.macros :only [node sel sel1]]))
