Merge branch 'develop' of github.com:simon-brooke/the-great-game into develop
This commit is contained in:
commit
9490c9fd3e
8
docs/codox/Building_on_microworld.html
Normal file
8
docs/codox/Building_on_microworld.html
Normal file
File diff suppressed because one or more lines are too long
36
docs/codox/Economy.html
Normal file
36
docs/codox/Economy.html
Normal file
File diff suppressed because one or more lines are too long
46
docs/codox/Genetic-buildings.html
Normal file
46
docs/codox/Genetic-buildings.html
Normal file
File diff suppressed because one or more lines are too long
8
docs/codox/Modelling_trading_cost_and_risk.html
Normal file
8
docs/codox/Modelling_trading_cost_and_risk.html
Normal file
File diff suppressed because one or more lines are too long
32
docs/codox/Naming-of-characters.html
Normal file
32
docs/codox/Naming-of-characters.html
Normal file
File diff suppressed because one or more lines are too long
17
docs/codox/On-dying.html
Normal file
17
docs/codox/On-dying.html
Normal file
File diff suppressed because one or more lines are too long
41
docs/codox/Sandbox.html
Normal file
41
docs/codox/Sandbox.html
Normal file
File diff suppressed because one or more lines are too long
37
docs/codox/Sexual-dimorphism.html
Normal file
37
docs/codox/Sexual-dimorphism.html
Normal file
File diff suppressed because one or more lines are too long
11
docs/codox/cc.journeyman.the-great-game.proving.core.html
Normal file
11
docs/codox/cc.journeyman.the-great-game.proving.core.html
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
106356
resources/test/sample-npcs-20200408.edn
Normal file
106356
resources/test/sample-npcs-20200408.edn
Normal file
File diff suppressed because it is too large
Load diff
24
src/cc/journeyman/the_great_game/proving/sketches.clj
Normal file
24
src/cc/journeyman/the_great_game/proving/sketches.clj
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
(ns cc.journeyman.the-great-game.proving.sketches
|
||||||
|
"Code that's useful for exploring, but probably not part of the final
|
||||||
|
product, and if it is, will end up somewhere else."
|
||||||
|
(:require [wherefore-art-thou.core :refer [*genders*]]))
|
||||||
|
|
||||||
|
|
||||||
|
(defn happy-cell?
|
||||||
|
"True if all NPCs at `c` (assumed to be a MicroWorld-style cell) are of
|
||||||
|
a happy disposition."
|
||||||
|
[c]
|
||||||
|
(when (:npcs c)
|
||||||
|
(every? #(> (:disposition %) 2) (:npcs c))))
|
||||||
|
|
||||||
|
(defn couple-cell?
|
||||||
|
[c]
|
||||||
|
(let [npcs (:npcs c)]
|
||||||
|
(when
|
||||||
|
(every? pos?
|
||||||
|
(map (fn [g]
|
||||||
|
(count (filter #(and (= g (:gender %))
|
||||||
|
(#{:ancestor :citizen} (:goal %))
|
||||||
|
(pos? (:disposition %))) npcs)))
|
||||||
|
(keys *genders*)))
|
||||||
|
c)))
|
Loading…
Reference in a new issue