-
Notifications
You must be signed in to change notification settings - Fork 1
First part for Indexes (+ other Issues) #108
Conversation
* backend allows different hands * single-argument ini-configs
* rules can play add-power cards * testing api * Fe limit (#3) * api passes limit * cards retrieved from rows * single-argument ini-config * useless spaces * new test
...I think I messed up, but don't know where :'( |
backend/src/rules/create_game.clj
Outdated
})) | ||
[hand player] | ||
{ | ||
:hand (loop [final-hand [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would replace the loop with this:
(mapv (fn [card id] (assoc card :id id)) hand (iterate inc 1000))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this does the same as the loop.
The loop is supposed to use indexes begining with 0 for player 0, and beginning with 1000 for player 1.
EDIT: Ok, only needed to change it for (iterate inc (* player 1000))
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than a small readability update, this is fine. Ping we after the change and I will approve.
This resolves #75, resolves #87 and is the first part for #55.
I merged the pull-request #103 and #105 into this for being able to work on #55.