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

Add the possibility to keep the cards of some players #203

Open
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

LucasColas
Copy link
Contributor

No description provided.

@LucasColas
Copy link
Contributor Author

I don't know how to how to fix that :
texasholdem/game/game.py:1279:4: R0912: Too many branches (16/12) (too-many-branches)
I tried to fix that with several solutions. But it's still here.

@LucasColas
Copy link
Contributor Author

Another thing I don't understand is about test. I have tests that fail related to game._deck. Sometimes _deck is NoneType. But I don't understand why.

@SirRender00
Copy link
Owner

@LucasColas I believe the error is from before the prehand where there is no deck attribute

@LucasColas
Copy link
Contributor Author

LucasColas commented Jul 4, 2023

Yes,
We can use deck I think.

@LucasColas LucasColas requested a review from SirRender00 July 8, 2023 05:25
@codecov
Copy link

codecov bot commented Jul 8, 2023

Codecov Report

Merging #203 (1390396) into main (f4b8dda) will decrease coverage by 0.08%.
The diff coverage is 66.66%.

@@            Coverage Diff             @@
##             main     #203      +/-   ##
==========================================
- Coverage   90.97%   90.89%   -0.08%     
==========================================
  Files          18       18              
  Lines        1174     1175       +1     
==========================================
  Hits         1068     1068              
- Misses        106      107       +1     
Files Changed Coverage Δ
texasholdem/game/game.py 92.97% <66.66%> (-0.20%) ⬇️

@LucasColas
Copy link
Contributor Author

I don't understand. Whever I run poetry run black . all files are left unchanged.

@LucasColas
Copy link
Contributor Author

LucasColas commented Jul 9, 2023

Everything is good for pytest, pylint and black.

@SirRender00
Copy link
Owner

Everything is good for pytest, pylint and black.

Nice. I could see about adding a test when I get back from vacation next week. Feel free as well to take a crack at adding a new test case. Perhaps in the tests.game.conftest copy predicate (which I have right now running random games and each predicate is run before and after each hand state).

Comment on lines +1353 to +1354
if cards_players_to_keep and i in cards_players_to_keep:
game.hands[i] = cards.copy()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I would prefer to have the default be that all the player cards are the same. Here, it's that all the cards are different.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LucasColas Did your latest change do anything for this?

Copy link
Contributor Author

@LucasColas LucasColas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, right.

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.

2 participants