Skip to content
This repository has been archived by the owner on Oct 2, 2018. It is now read-only.

First part for Indexes (+ other Issues) #108

Merged
merged 5 commits into from
Apr 6, 2018
Merged

First part for Indexes (+ other Issues) #108

merged 5 commits into from
Apr 6, 2018

Conversation

Masclins
Copy link
Collaborator

@Masclins Masclins commented Apr 3, 2018

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.

Masclins and others added 4 commits April 3, 2018 11:04
* 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
@Masclins
Copy link
Collaborator Author

Masclins commented Apr 3, 2018

...I think I messed up, but don't know where :'(

}))
[hand player]
{
:hand (loop [final-hand []
Copy link
Owner

@kenan-rhoton kenan-rhoton Apr 6, 2018

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))

Copy link
Collaborator Author

@Masclins Masclins Apr 6, 2018

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))

Copy link
Owner

@kenan-rhoton kenan-rhoton left a 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.

@Masclins Masclins merged commit ba8635d into kenan-rhoton:master Apr 6, 2018
@Masclins Masclins deleted the index branch April 6, 2018 06:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants