Created
October 27, 2011 18:25
-
-
Save fdaoud/1320378 to your computer and use it in GitHub Desktop.
Ball of mud
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
(let [ | |
rnd (send-command "status" "getPredictionRnd") | |
latest-rnd (send-command "prediction" "getLatestPredictionRnd" {:pooler_id pooler_id :sheet rnd}) | |
preds (send-command "prediction" "getPredictionsForMatchups" {:pooler_id pooler_id :sheet rnd :rnd latest-rnd})] | |
(if (or (nil? rnd) (= rnd 0)) | |
{:errors "rnd_is_nil_or_zero"} | |
(get-matchups | |
(cond | |
(seq preds) preds | |
(= rnd 1) (.query persistence "team_playoffs" {}) | |
true (send-command "result" "getWinners" {:rnd (dec rnd)}))))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment