Created
March 11, 2016 16:15
-
-
Save kliph/276dd4eaf2b94128e23a to your computer and use it in GitHub Desktop.
RETREAT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(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