Skip to content

Instantly share code, notes, and snippets.

(ns minesweeper.solver
(:use clojure.test))
(defn solve [scenario]
"Example input: {:rows 10 :cols 10 :mines 2}"
(let [mines (:mines scenario)
rows (:rows scenario)
cols (:cols scenario)
freecells (- (* rows cols) mines)]
(cond