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

[Mahjong] Determine current_player after pass #1053

Merged
merged 4 commits into from
Sep 29, 2023

Conversation

OkanoShinri
Copy link
Collaborator

resolve #1050

@codecov
Copy link

codecov bot commented Sep 29, 2023

Codecov Report

Merging #1053 (c6beac1) into main (8026dfb) will decrease coverage by 0.42%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1053      +/-   ##
==========================================
- Coverage   87.30%   86.89%   -0.42%     
==========================================
  Files          54       54              
  Lines        6035     6042       +7     
==========================================
- Hits         5269     5250      -19     
- Misses        766      792      +26     
Files Coverage Δ
pgx/_mahjong/_mahjong2.py 94.20% <100.00%> (+0.15%) ⬆️

... and 1 file with indirect coverage changes

@OkanoShinri
Copy link
Collaborator Author

打牌をしたときに全プレイヤーについて探索し、カンが可能なプレイヤー、ポンが可能なプレイヤー、チーが可能なプレイヤーを保持するようにしました。(複数のプレイヤーが同時に行動可能になることはないはず)
passの行動をしたとき、保持された値から次のプレイヤーと行動を求め、同時にそのプレイヤーと行動を値から削除します。

#     pon player, kan player, chi player
# b0       00         00         00

@OkanoShinri
Copy link
Collaborator Author

OkanoShinri commented Sep 29, 2023

マージしちゃいます!
カンドラの実装を思い出したのでそれ追加します
@sotetsuk

@sotetsuk
Copy link
Owner

はい🙏👍

@OkanoShinri OkanoShinri merged commit 54cbf83 into main Sep 29, 2023
5 of 6 checks passed
@OkanoShinri OkanoShinri deleted the okano/feat/mahjong-after-meld branch September 29, 2023 15:17
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.

[Mahjong] Determine the next player after Meld
2 participants