{"id":25185979,"url":"https://github.com/riteshsp2000/judgement-card-game","last_synced_at":"2025-07-01T14:36:22.367Z","repository":{"id":257197917,"uuid":"857474111","full_name":"riteshsp2000/judgement-card-game","owner":"riteshsp2000","description":null,"archived":false,"fork":false,"pushed_at":"2024-09-28T13:37:01.000Z","size":3809,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-04T08:47:48.316Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/riteshsp2000.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-09-14T18:52:06.000Z","updated_at":"2024-09-28T13:37:05.000Z","dependencies_parsed_at":"2025-02-09T19:51:19.914Z","dependency_job_id":null,"html_url":"https://github.com/riteshsp2000/judgement-card-game","commit_stats":null,"previous_names":["riteshsp2000/judgement-card-game"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/riteshsp2000/judgement-card-game","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riteshsp2000%2Fjudgement-card-game","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riteshsp2000%2Fjudgement-card-game/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riteshsp2000%2Fjudgement-card-game/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riteshsp2000%2Fjudgement-card-game/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/riteshsp2000","download_url":"https://codeload.github.com/riteshsp2000/judgement-card-game/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/riteshsp2000%2Fjudgement-card-game/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262981602,"owners_count":23394559,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-02-09T19:41:15.340Z","updated_at":"2025-07-01T14:36:22.343Z","avatar_url":"https://github.com/riteshsp2000.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Schemas\n\n1.  ActiveGames\n\n- gameId: Game\n\n2.  Game\n\n- players: Player[] (make sure order is maintained)\n- maxPlayers: number\n- minPlayers: number\n- currentHand: Hand[]\n- previousHands: Hand[]\n- score: {\n  playerId: number[]\n  }\n- dealtCards: [\n  playerId: Card[]\n  ]\n- status: STARTED | ROUND_IN_PROGRESS | ROUND_COMPLETED | COMPLETED\n- trumpCard: Card[]\n- playerToPlay: Player\n\n## Steps\n\n1. CREATE_GAME\n\n- generate a unique game id\n- creates the player object who created the game\n- initialise the game object\n- adds the player to the game object\n- stores the game in the active games object\n\n2. JOIN_GAME\n\n- takes in a game ID to be joined\n- checks if a game can be joined (min and max)\n- creates the player object\n- adds the player to the game object\n- updates the active games object\n\n3. START_GAME\n\n- checks if a game can be started (min and max)\n- deals card to each player\n\n4. START_ROUND\n\n- checks if round can be started\n- assigns player to play\n- assigns trump card\n- starts the round\n\n5. PLAY_CARD\n\n- checks if user has the card\n- checks if the card can be played (same suite, playing trump, no suite any card can be played)\n- check if all players played\n- if so, determine winner\n- updates scores\n- updates player to play\n- check if round ended\n- if so, start a new round\n\n\u003c!-- GAME HANDLING LOGIC --\u003e\n\n1. create game\n\n- create a game state\n- create a web socket room\n- create a web socket to game/player connection\n\n2. join game\n\n- check if game exists in state\n- add player to the game state\n- check if web socket room exists\n- add player to web socket room\n- create a web socket to game/player connection\n\n3. leave game\n\n- check if game exists in state\n- remove player from game state\n- check if web socket room exists\n- remove player from web socket room\n- if all players left the game, end the game\n\nData structure\n\n```\n{\n  rooms: Record\u003cstring, WebSocket[]\u003e;\n\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friteshsp2000%2Fjudgement-card-game","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Friteshsp2000%2Fjudgement-card-game","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Friteshsp2000%2Fjudgement-card-game/lists"}