|
#1
|
|||
|
|||
Re: Poker Hand XML
Here's another pass,
* put <antes> block back in * made the cards-block more explicit, with a <card> per card (as OrcaDK suggested) * removed playerId and mucked attributes on <cards>, and moved them to <hand> * made new <deal> block with open-attribute and playerId-attribute, to make showdown <cards> more consistent. The name deal is a bit awkward, but it expresses that one or more cards has been handed to a player or the community, and that the cards are either open or closed. Version 1.3 <font class="small">Code:</font><hr /><pre> <?xml version="1.0"?> <pokerhand id="11082740019" timestamp="2007-07-31 11:21:43"> <context> <location online="true"> <room name="Absolute Poker"/> <table id="562102981" name="Denmark Dr." seats="10"/> </location> <!-- betting-types=nolimit, potlimit or limit --> <game type="texasholdem" format="tournament" bettingtype="nolimit" currency="USD"> <!-- only use either tournament or cashgame tag --> <tournament buyin="10" vig="1" id="56210298"/> <!-- we need both stakes and max buyin I guess? --> <cashgame maxbuyin="400" bigblind="2"/> </game> <players> <!-- active is required, every active player takes part in this hand, ie. pays ante and recieves cards --> <player id="MuppetBingo" stack="1500" seat="1" active="true"/> <player id="KermitIsGreen" stack="1500" seat="4" active="true"/> <player id="Animal" stack="1500" seat="5" active="true"/> </players> </context> <rounds> <!-- antes is optional --> <antes> <ante playerId="MuppetBingo" amount="2"/> <ante playerId="KermitIsGreen" amount="2"/> <ante playerId="Animal" amount="2"/> </antes> <!-- a round is a deal of cards followed by a sequence of player actions --> <!-- possible round types are "preflop", "flop","turn", "river" --> <round id="preflop"> <!-- in 7 card stud deal will be a sequence of <cards> for each player, in texas-style games it will only contain 1 element --> <deals> <!-- open means whether the cards are visible to all. In stud there can be open non-community cards --> <deal playerId="MuppetBingo" open="false"> <cards> <card value="a" suit="c"/> <card value="a" suit="d"/> </cards> </deal> </deals> <!-- actions can be <bet> <call> , <fold> --> <actions> <!-- amount is optional, --> <!-- forced is optional and if omitted, will default to "false" --> <!-- possible types=bet, call, check or fold. --> <!-- name is optional, possible values = straddle, smallblind and bigblind --> <action type="bet" playerId="MuppetBingo" forced="true" name="smallblind" amount="10"/> <action type="bet" playerId="KermitIsGreen" forced="true" name="bigblind" amount="20"/> <action type="bet" playerId="Animal" forced="false" name="straddle" amount="40"/> <action type="bet" playerId="MuppetBingo" amount="10"/> <action type="bet" playerId="KermitIsGreen" amount="30"/> <action type="call" playerId="Animal" amount="30"/> <action type="call" playerId="MuppetBIngo" amount="20"/> </actions> </round> <round id="flop"> <deals> <!-- playerId is optional, and if not present it means the cards are community cards --> <deal open="true"> <cards> <card value="7" suit="c"/> <card value="2" suit="s"/> <card value="q" suit="h"/> </cards> </deal> </deals> <actions> <action type="check" playerId="MuppetBingo"/> <action type="bet" playerId="KermitIsGreen" amount="50"/> <action type="fold" playerId="Animal"/> <action type="call" playerId="MuppetBIngo" amount="50"/> </actions> </round> <round id="turn"> <deals> <deal open="true"> <cards> <card value="9" suit="h"/> </cards> </deal> </deals> <actions> <action type="check" playerId="MuppetBingo"/> <action type="check" playerId="KermitIsGreen"/> </actions> </round> <round id="river"> <deals> <deal open="true"> <cards> <card value="k" suit="c"/> </cards> </deal> </deals> <actions> <action type="check" playerId="MuppetBingo"/> <action type="check" playerId="KermitIsGreen"/> </actions> </round> </rounds> <result> <hands> <!-- mucked attribute is optional and has default value="false", cards is optional --> <hand playerId="MuppetBingo" mucked="false"> <cards> <card value="a" suit="c"/> <card value="a" suit="d"/> </cards> </hand> <hand playerId="KermitIsGreen" mucked="false"> <cards> <card value="a" suit="s"/> <card value="k" suit="s"/> </cards> </hand> <hand playerId="Animal" mucked="true"/> </hands> <!-- rake is optional --> <pots value="278.5" rake="1.5"> <pot number="1" value="278.5"> <winners> <!-- for split pots, this will contain multiple winners --> <winner playerId="MuppetBingo" amount="278.5"> <hand> <cards> <card value="a" suit="c"/> <card value="a" suit="d"/> <card value="q" suit="h"/> <card value="k" suit="c"/> <card value="9" suit="h"/> </cards> </hand> </winner> </winners> </pot> </pots> </result> </pokerhand> </pre><hr /> |
|
|