Skip to content

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

Open
LucasColas wants to merge 9 commits intoSirRender00:mainfrom
LucasColas:patch-3
Open

Add the possibility to keep the cards of some players#203
LucasColas wants to merge 9 commits intoSirRender00:mainfrom
LucasColas:patch-3

Conversation

@LucasColas
Copy link
Copy Markdown
Contributor

No description provided.

@LucasColas
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Owner

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

Comment thread texasholdem/game/game.py Outdated
@LucasColas
Copy link
Copy Markdown
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
Copy Markdown

codecov bot commented Jul 8, 2023

Codecov Report

❌ Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 90.89%. Comparing base (f4b8dda) to head (1390396).
⚠️ Report is 38 commits behind head on main.

Files with missing lines Patch % Lines
texasholdem/game/game.py 66.66% 1 Missing ⚠️
Additional details and impacted files
@@            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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@LucasColas
Copy link
Copy Markdown
Contributor Author

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

@LucasColas
Copy link
Copy Markdown
Contributor Author

LucasColas commented Jul 9, 2023

Everything is good for pytest, pylint and black.

@SirRender00
Copy link
Copy Markdown
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 thread texasholdem/game/game.py
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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