limited games to five robots. cuts them off silently if more than five are input

This commit is contained in:
Richard Harrington 2013-08-24 08:50:33 -04:00
parent 21cdd286b2
commit ca5b98f241

View File

@ -17,9 +17,10 @@
(defn get-programs
"gets a sequence of programs from the source-code
repository. some may be repeats. discards failed matches."
repository. some may be repeats. discards failed matches.
cuts off after five."
[program-keys]
(filter identity (map #(% source-programs/programs) program-keys)))
(take 5 (filter identity (map #(% source-programs/programs) program-keys))))
(defn add-game
"a function to update the games-store atom state.