{"id":30285604,"url":"https://github.com/adequatica/punto-banco-golango","last_synced_at":"2025-08-16T20:07:29.309Z","repository":{"id":308857259,"uuid":"1034297845","full_name":"adequatica/punto-banco-golango","owner":"adequatica","description":"Punto banco (Baccarat) card game on Go with text-based UI","archived":false,"fork":false,"pushed_at":"2025-08-08T08:33:02.000Z","size":91,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-08T10:23:37.845Z","etag":null,"topics":["baccarat","go"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/adequatica.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,"zenodo":null}},"created_at":"2025-08-08T06:59:51.000Z","updated_at":"2025-08-08T08:33:22.000Z","dependencies_parsed_at":"2025-08-08T10:23:40.399Z","dependency_job_id":"d3a29b60-7b22-4827-a132-ef24a17e14d3","html_url":"https://github.com/adequatica/punto-banco-golango","commit_stats":null,"previous_names":["adequatica/punto-banco-golango"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/adequatica/punto-banco-golango","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adequatica%2Fpunto-banco-golango","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adequatica%2Fpunto-banco-golango/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adequatica%2Fpunto-banco-golango/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adequatica%2Fpunto-banco-golango/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/adequatica","download_url":"https://codeload.github.com/adequatica/punto-banco-golango/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/adequatica%2Fpunto-banco-golango/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270763461,"owners_count":24641026,"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-08-16T02:00:11.002Z","response_time":91,"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":["baccarat","go"],"created_at":"2025-08-16T20:07:27.509Z","updated_at":"2025-08-16T20:07:29.295Z","avatar_url":"https://github.com/adequatica.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Punto Banco (Baccarat) on Go\n\nA Go implementation of the *punto banco* card game (a version of [Baccarat](https://en.wikipedia.org/wiki/Baccarat)), featuring a terminal-based UI built with the [Bubble Tea framework](https://github.com/charmbracelet/bubbletea/).\n\n\u003e This implementation does not include a gambling component — no real bets or payouts are involved.\n\n## Running the Application\n\nExecute the binary or run the application directly with:\n\n```bash\ngo run cmd/main.go\n```\n\n\u003cimg width=\"530\" src=\"./screenshot.png\" /\u003e\n\n## Features\n\n- 6 decks in the shoe\n- Casino-style shuffling with shoe cutting and card burning;\n- Game logic (`PlayPuntoBanco` function from `internal/punto_banco/punto_banco.go`) is separated from the UI, making it reusable for strategy simulations, but [the house always wins](https://paulvanderlaken.com/2018/01/10/baccarat-simulation-payoff/).\n\n## Game Rules\n\n*Punto banco* is a simplified version of Baccarat where each move is determined by the drawn cards. The game proceeds according to fixed rules, and players make no decisions during the coup (round). Unlike the *baccarat chemin de fer* that [James Bond played](https://www.youtube.com/watch?v=7nFgqmAMglk).\n\nThe game uses standard Baccarat card values:\n- Ace = 1\n- 2–9 = pip value\n- 10 and face cards (Jack, Queen and King) = 0\n\nThe objective is to predict which of the two hands, the Punto (player) or the Banco (banker), will have a total closest to nine.\n\nPlayer bets on either:\n- Punto (player)\n- Banco (banker)\n- Egalité (tie)\n\nThe dealer deals two cards to both the player and the banker.\n\nIf the total of a hand is 10 or more, only the last digit is counted (modulo 10).\n\nIf either the player or the banker (or both) has a total of **8 or 9**, the round ends immediately, it is referred to as a «natural».\n\nOtherwise:\n- If the player's total is **0–5**, they draw a third card.\n- If the player's total is **6 or 7**, they stand.\n\nThe banker's decision to draw a third card depends on both their total and the player's third card, following a predefined tableau:\n\n**Banker's total / Player's third card value**\n\n|     | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 |\n|-----|---|---|---|---|---|---|---|---|---|---|\n| 0-2 | H | H | H | H | H | H | H | H | H | H |\n| 3   | H | H | H | H | H | H | H | H | S | H |\n| 4   | S | S | H | H | H | H | H | H | S | S |\n| 5   | S | S | S | S | H | H | H | H | S | S |\n| 6   | S | S | S | S | S | S | H | H | S | S |\n| 7+  | S | S | S | S | S | S | S | S | S | S |\n\nLegend: H (Hit, draw another card), S (Stand, no more cards).\n\nAll possible combinations are covered with unit tests.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadequatica%2Fpunto-banco-golango","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fadequatica%2Fpunto-banco-golango","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fadequatica%2Fpunto-banco-golango/lists"}