Thread: Poker Hand XML
View Single Post
  #193  
Old 08-03-2007, 03:08 PM
OrcaDK OrcaDK is offline
Senior Member
 
Join Date: Nov 2004
Location: MTH
Posts: 1,496
Default Re: Poker Hand XML

[ QUOTE ]
I don't see the harm in having an optional attribute for player reads. I don't think anybody is proposing making this mandatory. All rvg is saying is that he will want to add player reads/notes for some hnads and he would like to get agreement on the best way to do this. My understanding of xml is limited but if a parser is expecting :-

<seat id="7" name="koraaf" stack="359.8" active="true" ante="0"/>

it should not break if it gets:-

<seat id="7" name="koraaf" stack="359.8" active="true" ante="0" read = "85/40/0.1 DONKEY!"/>

The advantage of specifying at this point how reads should be stored, is that anyone writing an application using rvg's reads will also be able to take advantage of anybody else's app that exported reads in the same standard.

Like I said I don't know much about xml and if we would have to include a blank field for players with no read data, then I withdraw everything I just said.


[/ QUOTE ]
If we are to do this, then it must not be via an attribute, that leaves us far too few options as we can't even allow CDATA in there. I propose that we add a <metadata> element to the hand of type CDATA. This metadata section could then include any number of XML structures, delimited text or whatever, containing the reads, meta instructions and so forth. That'll be an optional element and any parsers can simply ignore that element unless they have a reason not to.

[ QUOTE ]
I'm kinda sympathetic to Shoe Lace's memory concerns. I'd like a won/loss summary mainly because I think it is a good check to make sure both the xml convertor and the app reading the xml output have performed correctly. But if we implement it there's no need to have a separate summary section. Can't we just add a field to the player info at the start of the hand.

We'd have:-

<seat id="7" name="koraaf" stack="359.8" active="true" ante="0" won="-10.8"/>

That shouldn't be more than 100 bytes added for a 9 player game.

[/ QUOTE ]
This is a good idea. There is no reason the summary information should be at the end of the hand, we can simply include it at the top. Adding things like won="true/false" and net="2492" would not take up much space and that is very valuable summary information.
Reply With Quote