Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor pool generation #349

Merged
merged 26 commits into from
Feb 26, 2019
Merged

Refactor pool generation #349

merged 26 commits into from
Feb 26, 2019

Conversation

HerveH44
Copy link
Contributor

@HerveH44 HerveH44 commented Feb 25, 2019

This one is a big baby. I rewrote the part where the server creates the pool (packs of cards) to have a specific entry for every type of game we handle.

I haven't touched at the packs creation in se (with all the specific rules depending of the set), just clarified how we create a cube pool, normal pool or chaos pool.

Closes #68
I added the mode chaos sealed. It takes the same parameters as chaos draft.

Closes #25
I then pushed a little bit to introduce "cubePoolSize" a new variable to adjust the number of cards a cube player can have in his sealed.

Closes #27
In the end I also added the cube hash requested by @dev-id to the draft cap. I used md5, is it

Closes #350
I also cleaned up a bit code when I saw there was something old (readyToStart feature parts for example)

@HerveH44 HerveH44 temporarily deployed to beta-dr4ft-pr-349 February 25, 2019 14:40 Inactive
@HerveH44 HerveH44 temporarily deployed to beta-dr4ft-pr-349 February 25, 2019 15:00 Inactive
@HerveH44 HerveH44 temporarily deployed to beta-dr4ft-pr-349 February 25, 2019 15:04 Inactive
@tooomm
Copy link
Contributor

tooomm commented Feb 25, 2019

It throws an error for me when starting a game: (room creation works)
error msg

No matter which combination of settings (modern only, total chaos) I choose.

@HerveH44 HerveH44 temporarily deployed to beta-dr4ft-pr-349 February 25, 2019 15:30 Inactive
@HerveH44 HerveH44 temporarily deployed to beta-dr4ft-pr-349 February 25, 2019 15:49 Inactive
@HerveH44 HerveH44 temporarily deployed to beta-dr4ft-pr-349 February 25, 2019 15:56 Inactive
@HerveH44 HerveH44 temporarily deployed to beta-dr4ft-pr-349 February 25, 2019 15:59 Inactive
@HerveH44
Copy link
Contributor Author

@tooomm can you try with the last build? I understood that heroku didn't use the last version of NodeJS!

@tooomm
Copy link
Contributor

tooomm commented Feb 25, 2019

No error now! :)

@HerveH44 HerveH44 temporarily deployed to beta-dr4ft-pr-349 February 25, 2019 16:13 Inactive
@ZeldaZach
Copy link
Member

Playing sealed, but it's still in draft-like mode? It also shifts my position in the draft every time the timer expires and adds more cards to my draft pool.
screenshot 2019-02-25 15 25 05

screenshot 2019-02-25 15 25 51

Trying to start a triple RNA draft doesn't work... and now your heroku instance died :P

@HerveH44 HerveH44 temporarily deployed to beta-dr4ft-pr-349 February 25, 2019 21:21 Inactive
@HerveH44 HerveH44 temporarily deployed to beta-dr4ft-pr-349 February 25, 2019 22:53 Inactive
@HerveH44 HerveH44 temporarily deployed to beta-dr4ft-pr-349 February 25, 2019 23:43 Inactive
@HerveH44 HerveH44 temporarily deployed to beta-dr4ft-pr-349 February 25, 2019 23:43 Inactive
@ZeldaZach
Copy link
Member

Overall, this is a great change and can't wait to get it added!

Some concerns:

I don't see cubeHash used anywhere. No way to see the has you generate. Also, please use something other than MD5, like sha512.

When trying to cube draft, on the last pack, the last pick glitchs out and leaves a state where you're missing a card and have this: (Note the card is never added to your pool. I did an 8x3 and ended up with 24 cards here.
screenshot 2019-02-25 19 05 54

@HerveH44 HerveH44 temporarily deployed to beta-dr4ft-pr-349 February 26, 2019 09:12 Inactive
@HerveH44 HerveH44 temporarily deployed to beta-dr4ft-pr-349 February 26, 2019 09:31 Inactive
@HerveH44 HerveH44 requested a deployment to beta-dr4ft-pr-349 February 26, 2019 09:40 Abandoned
@ZeldaZach ZeldaZach merged commit 75c2e97 into master Feb 26, 2019
@ZeldaZach ZeldaZach deleted the refactor_pool branch February 26, 2019 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants