Commits

John Chandler committed 44928cf

removed unused update-row code

  • Participants
  • Parent commits 3a8cc6c

Comments (0)

Files changed (2)

File src/pseudohkoo/core.clj

   ; returns true if row has been completed or false if not
   (= (required-values row) (set row)))
 
-(defn update-row [row column-index new-value]
-  ; returns a copy of row with the indicated column set to new-value
-  (let [head (take column-index row)
-	tail (nthnext row (+ column-index 1))]
-    (concat head [new-value] tail)))
-
 ;; column functions
 (defn get-column [grid column-index]
   ; returns the specified column from the grid

File test/pseudohkoo/test/core.clj

     (is (= expected (get-columns grid)))))
 
 
-;; update-row
-(deftest test-update-row
-  ; set first cell in the row
-  (is (= [1 0 0] (update-row [0 0 0] 0, 1)))
-  ; set middle cell in the row
-  (is (= [0 1 0] (update-row [0 0 0] 1, 1)))
-  ; set last cell in the row
-  (is (= [0 0 1] (update-row [0 0 0] 2, 1))))
-
-
 ;; get-box
 (deftest test-get-box
   ; test getting values from a box