d134612014c5
Tweak mutation
author | Steve Losh <steve@stevelosh.com> |
---|---|
date | Mon, 14 Dec 2015 19:40:58 +0000 |
parents | a88ac1a9acea |
children | c3a802d2c176 |
branches/tags | (none) |
files | src/silt/core.clj |
Changes
--- a/src/silt/core.clj Mon Dec 14 19:31:58 2015 +0000 +++ b/src/silt/core.clj Mon Dec 14 19:40:58 2015 +0000 @@ -131,7 +131,7 @@ (str (java.util.UUID/randomUUID))) (defn mutate-directions [dirs] - (update-in dirs [(rr/rand-int 0 9) 1] inc)) + (update-in dirs [(rr/rand-int 0 9) 1] + (rr/rand-int 1 5))) (defn clamp [v minimum] (max v minimum)) @@ -144,11 +144,11 @@ (maybe (or mc 10) v (clamp (+ v (rand-nth [-1 1])) 1))) (update :directions - (maybe (or mc 20) v + (maybe (or mc 10) v (mutate-directions v))) (update-in [:styles :fg] (maybe (or mc 0.8) v - (rr/rand-nth [:white :blue :green :yellow :red]))) + (rr/rand-nth [:white :blue :green :yellow :red :cyan]))) (update :glyph (maybe (or mc 0.05) v (rr/rand-nth [";" "☃" "$" "&" "!" ":" "¥" "£" "¤" "€"