Implement Four Color Card multiplayer game with intelligent bot system#6
Draft
Implement Four Color Card multiplayer game with intelligent bot system#6
Conversation
Co-authored-by: lin594 <20886330+lin594@users.noreply.github.com>
Co-authored-by: lin594 <20886330+lin594@users.noreply.github.com>
Co-authored-by: lin594 <20886330+lin594@users.noreply.github.com>
Co-authored-by: lin594 <20886330+lin594@users.noreply.github.com>
Co-authored-by: lin594 <20886330+lin594@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add online four-color card game using PocketBase
Implement Four Color Card multiplayer game with intelligent bot system
Feb 2, 2026
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.
Overview
Complete implementation of Four Color Card (四色牌) online multiplayer game with PocketBase backend, intelligent bot system, and mobile-optimized Vue 3 frontend.
Architecture
Backend (Go + PocketBase + Goja)
userscollection with bot support (is_bot,bot_level)bot_scheduler.go) - 2s polling loop, executes bot moves via JavaScript game logicgame_actionsfor audit/replayFrontend (Vue 3 + Vite + Vant)
Game Logic (JavaScript)
Key Components
Bot Decision System
Bot Scheduler
API Endpoints
Database Schema
Enhanced Collections:
users: addedis_bot,bot_levelgame_states: addedcurrent_player_index,dealer_indexfor positional logicgame_actions: event log with sequence numbersCode Quality
Documentation
FOUR_COLOR_CARD_GUIDE.md: Complete game rules, API reference, deployment (bilingual)IMPLEMENTATION_PLAN.md: Technical architecture, code structure, examplesPROJECT_SUMMARY.md: Statistics, performance metrics, lessons learnedfrontend/README.md: Frontend architecture and setupDeployment
Backend:
go build -o cardgames ./cardgames serve # Port 8090Frontend:
Technical Highlights
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.