Add bot participation in deal phase with requests#66
Merged
Roushelfy merged 3 commits intogame-simulatorfrom Dec 1, 2025
Merged
Add bot participation in deal phase with requests#66Roushelfy merged 3 commits intogame-simulatorfrom
Roushelfy merged 3 commits intogame-simulatorfrom
Conversation
Copilot stopped work on behalf of
Roushelfy due to an error
December 1, 2025 18:43
Collaborator
|
@copilot 在deal阶段也让bot参与,每次发一张牌都需要给bot一个request,并收集response来决定bot是否亮牌/反牌。测试是否能正常进行游戏。 |
Co-authored-by: Roushelfy <104953631+Roushelfy@users.noreply.github.com>
Co-authored-by: Roushelfy <104953631+Roushelfy@users.noreply.github.com>
Contributor
Author
已实现Bot在deal阶段的参与。修改了 主要新增方法:
Commit: 1384dbf |
Copilot
AI
changed the title
[WIP] Add bot participation in deal phase with requests
Add bot participation in deal phase with requests
Dec 1, 2025
Collaborator
|
@copilot 你有进行完整对局测试没 |
Contributor
Author
是的,我进行了完整的测试。测试内容包括:
所有测试都通过: 服务器也能正常启动。 |
Copilot stopped work on behalf of
Roushelfy due to an error
December 1, 2025 19:12
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enables bots to participate in the deal phase of the Tractor card game. Each time a card is dealt to a bot player, a request is sent to the bot service to get the bot's decision on whether to declare trump (亮主) or counter-bid (反主).
Changes Made
Modified
DrawingPhaseManager.jsto enable bot participation in the deal phase:triggerBotDealAction(player, card, playerIndex)- After each card is dealt to a bot, this method calls the bot service to get the bot's decision on whether to declare trump or counter-bid.parseBotDealCards(selectedCards)- Parses the bot's selected cards to determine the trump suit and count (single or pair). Supports joker pair declarations for no-trump.executeBotTrumpDeclaration(player, suit, count, selectedCards)- Validates and executes the bot's trump declaration, broadcasting the result to all players and resetting the dealer countdown timer when appropriate.Implementation Details
The implementation:
BotService.getBotDealAction()methodvalidateDeclarationutilitytrump_declaredandtrump_updatedevents to all clientsOriginal prompt
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.