{"id":15642081,"url":"https://github.com/phstc/javapokertexasholdem","last_synced_at":"2025-04-30T09:24:13.915Z","repository":{"id":1021741,"uuid":"849538","full_name":"phstc/javapokertexasholdem","owner":"phstc","description":"Java SE implemention for Texas Hold'em Poker","archived":false,"fork":false,"pushed_at":"2020-10-23T15:51:00.000Z","size":60,"stargazers_count":69,"open_issues_count":1,"forks_count":42,"subscribers_count":17,"default_branch":"master","last_synced_at":"2024-12-26T15:02:09.357Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phstc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2010-08-19T19:10:35.000Z","updated_at":"2024-12-02T09:14:10.000Z","dependencies_parsed_at":"2022-07-18T17:17:31.724Z","dependency_job_id":null,"html_url":"https://github.com/phstc/javapokertexasholdem","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phstc%2Fjavapokertexasholdem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phstc%2Fjavapokertexasholdem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phstc%2Fjavapokertexasholdem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phstc%2Fjavapokertexasholdem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phstc","download_url":"https://codeload.github.com/phstc/javapokertexasholdem/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":232654884,"owners_count":18556472,"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":"2024-10-03T11:54:14.541Z","updated_at":"2025-01-06T00:07:49.773Z","avatar_url":"https://github.com/phstc.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Java SE implemention for Texas Hold'em Poker\n\nIt's fully functional core engine implentation of Texas Hold'em Poker.\n\n## Check out the following example\n\n```java\n\n\tGameTexasHoldem game = new GameTexasHoldem();\n\tIPlayer homer = new Player();\n\tIPlayer flanders = new Player();\n\tIDeck deck = new Deck();\n\t// The Deck and Player used in the GameTexasHoldem are interfaces..\n\t// The newGame signature: public void newGame(IDeck deck, IPlayer player1, IPlayer... _players).\n\t// At least one player is mandatory to start the game, but you can add as many players as you want (Java Varargs).\n\tgame.newGame(deck, homer, flanders);\n\tgame.deal();\n\tgame.callFlop();\n\tgame.betRiver();\n\tgame.betTurn();\n\tList\u003cIPlayer\u003e winnerList = game.getWinner();\n\t\n        // Getting the result\n\tif(winnerList.size() \u003e 1){\n\t\t// DRAW GAME\n\t} else if(winnerList.contains(homer)) {\n\t\t// HOMER WINNER\n\t\t// WINNER HAND: homer.getRankingEnum();\n\t} else if(winnerList.contains(flanders)) {\n\t\t// FLANDERS WINNER\n\t\t// WINNER HAND: flanders.getRankingEnum();\n\t}\n\t\n\t// The table cards\n\tgame.getTableCards(); \n\t\n\t// To get the player actual ranking\n\thomer.getRankingEnum();\n\tflanders.getRankingEnum();\n\t// IPlayer.getRankingEnum() can be changed in deal, call flop, bet river and bet turn.\n```\n\nThe IPlayer.getRankingEnum() method returns RankingEnum which contains the actual ranking of the player.\n\n```java\n\tpublic enum RankingEnum { {\n\t\tROYAL_FLUSH, \n\t\tSTRAIGHT_FLUSH, \n\t\tFOUR_OF_A_KIND, \n\t\tFULL_HOUSE, \n\t\tFLUSH, \n\t\tSTRAIGHT, \n\t\tTHREE_OF_A_KIND, \n\t\tTWO_PAIR, \n\t\tONE_PAIR, \n\t\tHIGH_CARD\n\t}\n```\n\n## Performance test\n\nGameTexasHoldemRunner.main() executes the performance test and outputs it in two CSV report files.\n\n### Results\n\n* Macbook pro\n* HD ATA de 320 GB (5.400 rpm)\n* Memory 4GB 1066MHz DDR3 SDRAM - 2x2GB\n* Processor 2.53GHz Intel Core 2 Duo\n* O.S. Snow Leopard\n* 100000 executions = 6 seconds\n* 10000 executions = 1 seconds\n\n### Generated reports \n\nExample for 10000 executions \n\n\texecutions: 10000, minutes: 0, seconds: 1\n\tgetStatsSimple - OK - /Users/pablo/workspace/javapokertexasholdem/stats10000-simple.csv\n\tgetStatsFull - OK - /Users/pablo/workspace/javapokertexasholdem/stats10000-full.csv\n\t\n#### stats simple\n\nColumns:\n \n* STATS = RankingEnum winner\n* COUNT = how many times the same RankingEnum winner occurs\n* PERCENT = percentual of the COUNT compared with all executions\n\n#### stats full\n\nColumns: \n\n* DEALER DEAL = dealer RankingEnum in the deal step\n* PLAYER DEAL = player RankingEnum in the deal step\n* DEALER CALL FLOP = dealer RankingEnum in the call flop step\n* PLAYER CALL FLOP = player RankingEnum in the call flop step\n* DEALER BET TURN = dealer RankingEnum in the bet turn step\n* PLAYER BET TURN = player RankingEnum in the bet turn step\n* DEALER BET RIVER = dealer RankingEnum in the bet river step\n* PLAYER BET RIVER = player RankingEnum in the bet river step\n* WINNER = winner name (player or dealer)\n* COUNT = how many times the same game occurs\n* PERCENT = percentual of the COUNT compared with all executions\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphstc%2Fjavapokertexasholdem","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphstc%2Fjavapokertexasholdem","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphstc%2Fjavapokertexasholdem/lists"}