{"id":20471616,"url":"https://github.com/abdullahazharkhan/headsortails-opencv","last_synced_at":"2025-04-13T11:08:02.139Z","repository":{"id":240407300,"uuid":"800693244","full_name":"abdullahazharkhan/HeadsOrTails-openCV","owner":"abdullahazharkhan","description":"Hand-gesture-based Game HeadsTails, built with Python and OpenCV.","archived":false,"fork":false,"pushed_at":"2024-05-18T17:00:23.000Z","size":524,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-19T17:24:13.022Z","etag":null,"topics":["computer-vision","opencv","opencv-python","python"],"latest_commit_sha":null,"homepage":"","language":"Python","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/abdullahazharkhan.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-05-14T20:17:21.000Z","updated_at":"2024-05-18T19:20:07.000Z","dependencies_parsed_at":"2024-05-18T17:24:14.257Z","dependency_job_id":"a3d4d58a-6caf-4433-b45c-520ce58dad79","html_url":"https://github.com/abdullahazharkhan/HeadsOrTails-openCV","commit_stats":null,"previous_names":["abdullahazharkhan/headsortails-opencv"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdullahazharkhan%2FHeadsOrTails-openCV","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdullahazharkhan%2FHeadsOrTails-openCV/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdullahazharkhan%2FHeadsOrTails-openCV/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abdullahazharkhan%2FHeadsOrTails-openCV/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abdullahazharkhan","download_url":"https://codeload.github.com/abdullahazharkhan/HeadsOrTails-openCV/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224792468,"owners_count":17370788,"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":["computer-vision","opencv","opencv-python","python"],"created_at":"2024-11-15T14:16:46.924Z","updated_at":"2024-11-15T14:16:48.800Z","avatar_url":"https://github.com/abdullahazharkhan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# HeadsTails - with ComputerVision\nA popular hand-gesture-based game known as HeadsTails, built with Python and OpenCV.\n\n### Demo\n[HeadsTails.webm](https://github.com/abdullahazharkhan/HeadTail-openCV/assets/109475658/c24edb51-3f1b-4de9-bbac-edc6921312cf)\n\n### How to Play\nHeadsTails is played between two players. The game involves choosing between Heads or Tails and then using hand gestures to represent runs, similar to cricket but with hands.\n\n**Wait for the timer to turn 3 to take your move (hand gesture) as an input.**\n\n**Press SPACE to go to the next step.**\n\n#### Start\n- At the start of the game, each player chooses either Heads or Tails.\n- A toss is conducted to determine the starting player.\n#### Toss\n- Both players show one hand with a number of fingers extended (between 1 and 5).\n- If the sum of both players' fingers is even, the player who chose Tails wins the toss.\n- If the sum is odd, the player who chose Heads wins the toss.\n- The toss winner decides whether to bat or bowl first.\n#### Gameplay\n- Both players show hand gestures to represent runs:\n- 1 finger = 1 run\n- 2 fingers = 2 runs\n- 3 fingers = 3 runs\n- 4 fingers = 4 runs\n- 5 fingers = 5 runs\n- Thumb = 6 runs\n- No fingers (closed fist) = 10 runs\n- If the batter and bowler show the same hand gesture, the batter is out.\n#### Switching Roles:\n- When a batter is out, the roles switch. The bowler becomes the batter and vice versa.\n- The new batter tries to chase the target set by the previous batter.\n#### Winning the Game:\n- If the new batter successfully completes the target, he wins.\n- If the new batter fails to meet the target i.e. gets out, the opponent wins.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdullahazharkhan%2Fheadsortails-opencv","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabdullahazharkhan%2Fheadsortails-opencv","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabdullahazharkhan%2Fheadsortails-opencv/lists"}