Skip to content

Instantly share code, notes, and snippets.

@kliph
Created March 11, 2016 16:15
Show Gist options
  • Save kliph/276dd4eaf2b94128e23a to your computer and use it in GitHub Desktop.
Save kliph/276dd4eaf2b94128e23a to your computer and use it in GitHub Desktop.
RETREAT
(ns gol.test
(:require [clojure.test.check :as tc]
[clojure.test.check.generators :as gen]
[clojure.test.check.properties :as prop]))
(def live-cell-with-fewer-than-two-live-neighbors-dies
(gen/sample (gen/such-that #(and (not= coords1 coords2) )) (gen/return )))
(def two-live-board
(let [coords1
coords2]
(-> board
assoc-in [coords1] true
assoc-in [coords2] true)))
(def coord
(gen/tuple (gen/choose 0 2) (gen/choose 0 2)))
(def board (gen/return (take 3 (repeat [false false false]))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment