{"id":20446204,"url":"https://github.com/the-zagy/lucky-game","last_synced_at":"2026-05-17T17:02:08.177Z","repository":{"id":130741133,"uuid":"540240372","full_name":"The-Zagy/lucky-game","owner":"The-Zagy","description":"with the friendship and brotherhood power nagy and ahmed managed to transform this indescribable game from jonnas shemdtmann course from a local browser game into a real time game that you can play with your friends 😿 ","archived":false,"fork":false,"pushed_at":"2022-11-18T17:19:19.000Z","size":190,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-05T08:45:46.032Z","etag":null,"topics":["game","socket-io"],"latest_commit_sha":null,"homepage":"https://lucky-game.up.railway.app/","language":"JavaScript","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/The-Zagy.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":"2022-09-23T01:54:32.000Z","updated_at":"2022-11-23T14:32:09.000Z","dependencies_parsed_at":null,"dependency_job_id":"68e0e280-546a-4834-83ad-c67aac7676c7","html_url":"https://github.com/The-Zagy/lucky-game","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/The-Zagy/lucky-game","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Zagy%2Flucky-game","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Zagy%2Flucky-game/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Zagy%2Flucky-game/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Zagy%2Flucky-game/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/The-Zagy","download_url":"https://codeload.github.com/The-Zagy/lucky-game/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-Zagy%2Flucky-game/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278542673,"owners_count":26004060,"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","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["game","socket-io"],"created_at":"2024-11-15T10:18:27.533Z","updated_at":"2025-10-06T00:41:03.026Z","avatar_url":"https://github.com/The-Zagy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lucky Game\n***WE REACHED FIRST WORKING DEMO BABEEE!!!!!!!!!!!!***\n\n## How to start the demo \n- Clone  ``git clone git@github.com:The-Zagy/lucky-game.git``\n- `cd lucky-game`\n- `npm install`\n- You can run `npm run build:start` to build application then start  **or**\n\n```\nnpm run build\nnpm run start\n```\n- Default URL `http://localhost:3000`, unless you set another `PORT` in `.env` file\n- **FOCUS** our demo still a demo after all so `Join Room` button in main page does not **WORK**, whatever create new room click `F12` copy Room ID go to [view/js/player2.js](./view/js/player2.js) edit ***auth.roomId*** with the new roomId **in line 25 for now hhhhh**,\n***Example***\n```\nconst socket = io('/player2', {\n    auth: {\n        roomId: '***YOUR PLAYER1 ROOM ID***'\n    }\n});\n```\n- Tell Us What You Think\n\n## game rules\n\nthe first player start and dice the rolls and keep adding points to the current score   ,if the first player get 1 point on the dice roll then the current score set to 0 and nothing get added to the player score  , and then its player two turn   ,if the first player press the hold button then the current score got added to the player score and then its player two turn     ,  the first player reach score of 100 win the game   you can press the new game button to reset the game\n\n## Events Table\n***i'm lazy you can find all the events handled by server and client in [events.d.ts](./src/events.d.ts), THIS TABLE IS NOT RIGHT AT ALL AND I DON'T CARE***\n\n| Event Name     | data sent with | when                                                                              | To      | From     |\n|----------------|----------------|-----------------------------------------------------------------------------------|---------|----------|\n| msg            | string         | on user connection/disconnection                                                  | server  | any user |\n| newUser        | string         | proadcast to every one expect the user connected                                  | server  | any user |\n| createRoom     | void           | player 1 wants to create new room                                                 | player1 | server   |\n| roomCreated    | {roomId: id}   | respond to player1 with the room created id[must redirect this user to play room] | server  | player1  |\n| player1:play   | TBD            | when player1 hold on score                                                        | player1 | server   |\n| player1:played | TBD            | server send it to player2 with player1 play info                                  | server  | player2  |\n| askJoinRoom    | {roomId: id}   | player2 asks to join room already created by player1                              | player2 | server   |\n| joinedRoom     | {roomId: id}   | server responds to player2 on join room request                                   | server  | player2  |\n| player2:play   | TBD            | player2 hold on score                                                             | player2 | server   |\n| player2:played | TBD            | server send it to player1 with player2 play info                                  | server  | player1  |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-zagy%2Flucky-game","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthe-zagy%2Flucky-game","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-zagy%2Flucky-game/lists"}