{"id":21071594,"url":"https://github.com/esrrhs/teenpatti_algorithm","last_synced_at":"2025-07-26T10:15:56.850Z","repository":{"id":87695701,"uuid":"153249161","full_name":"esrrhs/teenpatti_algorithm","owner":"esrrhs","description":"teenpatti algorithm","archived":false,"fork":false,"pushed_at":"2019-11-14T06:38:09.000Z","size":445,"stargazers_count":15,"open_issues_count":0,"forks_count":8,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-05-16T05:38:05.970Z","etag":null,"topics":["algorithm","java","teenpatti"],"latest_commit_sha":null,"homepage":"","language":"Java","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/esrrhs.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":"2018-10-16T08:21:37.000Z","updated_at":"2024-02-07T03:48:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"807d0874-b068-4db4-bb8c-538f3326e0ec","html_url":"https://github.com/esrrhs/teenpatti_algorithm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/esrrhs/teenpatti_algorithm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esrrhs%2Fteenpatti_algorithm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esrrhs%2Fteenpatti_algorithm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esrrhs%2Fteenpatti_algorithm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esrrhs%2Fteenpatti_algorithm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/esrrhs","download_url":"https://codeload.github.com/esrrhs/teenpatti_algorithm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/esrrhs%2Fteenpatti_algorithm/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267149802,"owners_count":24043462,"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-07-26T02:00:08.937Z","response_time":62,"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":["algorithm","java","teenpatti"],"created_at":"2024-11-19T18:53:42.041Z","updated_at":"2025-07-26T10:15:56.723Z","avatar_url":"https://github.com/esrrhs.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 印度炸金花TeenPatti算法\n用于印度炸金花TeenPatti的带鬼牌的算法，通过牌查表获得牌型和大小。算法由texas_algorithm修改得来。\n\n## 使用\n``` xml\n\u003cdependency\u003e\n    \u003cgroupId\u003ecom.github.esrrhs\u003c/groupId\u003e\n    \u003cartifactId\u003eteenpatti_algorithm\u003c/artifactId\u003e\n    \u003cversion\u003e1.0.2\u003c/version\u003e\n\u003c/dependency\u003e\n```\n``` java\n// 获取3张手牌的牌型\nTeenPattiAlgorithmUtil.getWinType(\"黑2,黑3,鬼\");\n// 获取3张牌的大小，用于比牌\nint win = TeenPattiAlgorithmUtil.getWinPosition(\"黑2,黑3,黑4\");\n```\n\n## 测试玩玩\n* 运行TestUtil.Main\n\n## 生成表玩玩\n* 运行 TeenPattiAlgorithmUtil.Main\n\n# 查表算法\n查表算法，给定任意3张牌，查表给出3张最大牌的大小、类型。查表方法很简单，下面讲一下生成表的算法。\n\n### 算法实现\n\n#### 穷举C(52, 3)的组合\n52张牌里面选3张，对3张牌进行编码变成int类型，得到一个数组。\n\n#### 多线程快速排序\n对这数组进行从小到大排序，排序依据就是牌的大小。使用多线程快速排序。\n\n#### 结果输出\n数组已经排好序，现在按照顺序输出到一个文件，内容有key、大小顺序、可阅读的牌面信息。\n\n## 其他\n\u003ca href=\"https://github.com/esrrhs/majiang_algorithm\"\u003e麻将算法\u003c/a\u003e\n\u003ca href=\"https://github.com/esrrhs/texas_algorithm\"\u003e德州算法\u003c/a\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesrrhs%2Fteenpatti_algorithm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fesrrhs%2Fteenpatti_algorithm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fesrrhs%2Fteenpatti_algorithm/lists"}