Kungsgeten Posted October 25, 2013 Report Share Posted October 25, 2013 Hi! I'm working on a way to write bridge system notes in text format, which then can be converted into nice looking PDF documents or HTML pages (and even the BBO full disclosure format, bu then only the bidding sequences). If you're interested, you can check it out at https://github.com/kungsgeten/bml . I'm planning to add functionality to add deal diagrams. My hope is that it should be easy to both write and read these diagrams. The most obvious solution would be something like this: Dealer:North Vul:EW Kxx T9 xxx Q987x QT Jxx KQxxxx Jxx KTx AJxx Jx KTx A987x Ax Q9x Axx This is easy to read, since it looks like a normal deal diagram. The problem is that it takes time to write. There's a lot of whitespace going on. PBN uses this notation: N:K62.T9.542.Q9874 J53.J85.AJ86.KT5 A9874.A3.Q93.A63 QT.KQ7642.KT7.J2 This is hard to read, and pretty hard to write too. I guess it is better suited as a data storage format. LIN-files uses something similar. One could use the PBN-style, but separate the hands on different rows (and indicate which player holds each hand): Dealer:North Vul:EW N:K62.T9.542.Q9874 E:J53.J85.AJ86.KT5 S:A9874.A3.Q93.A63 W:QT.KQ7642.KT7.J2 Its some sort of middleway I guess. The suits could also be separated on different lines: Dealer:North Vul:EW North Kxx T9 xxx Q987x West QT KQxxxx KTx Jx South A987x Ax Q9x Axx East Jxx Jxx AJxx KTx This takes up quite a lot of vertical space, but (to me) makes it easy to read the players' individual hands. Ofcourse it is not as easy to read the whole deal as the first example though. So, which one of these notation styles (or please suggest other alternatives) would you suggest supporting? Supporting multiple ways is probably possible as well I guess. Quote Link to comment Share on other sites More sharing options...
TylerE Posted October 25, 2013 Report Share Posted October 25, 2013 Best format for hands IMO is simply one line per hand, space seperated. - for a void. No special syntax, punctuation, or anything. Hands in NESW order, and a simple header row For your example hand N EW Kxx T9 xxx Q987x Jxx Jxx AJxx KTx A987x Ax Q9x Axx QT KQxxxx KTx Jx Syntax extensions: Allow //comments and also treat everything leading a line up to the first colon, and leading spaces as well, as a comment, and optional punctuation between fields So: N, EW //With syntax extensions N: Kxx T9 xxx Q987x E: Jxx Jxx AJxx KTx S: A987x Ax Q9x Axx W: QT KQxxxx KTx Jx Quote Link to comment Share on other sites More sharing options...
nige1 Posted October 25, 2013 Report Share Posted October 25, 2013 I use the formatsBoard 2 NS/E West S:Kxx H:Tx D:xxx C:Qxxxx North S:Jxx H:Jxx D:AJxx C:KTx East S:AQT987x H- D:KQT9xx C- South S- H:AKQxxxxx D- C:AJxxx ............... North #02............ S: J x x NS/E........... H: J x x ............... D: A J x x West........... C: K T x....... East S: K x x ...................... S: A Q T 9 8 7 x. H: T x ........................ H- D: x x x ...................... D: K Q T 9 x x C: Q x x x x ...South.......... C- ............... S- 7H by S........ H: A K Q x x x x x Lead Dx........ D- ............... C: A J x x x Advantages:In the short format, each hand is the same length, even when containing voids. This helps check for hands with the wrong number of cards..Easy to specify endings with few cards in each hand and lots of voids.Easy to specify just two hands for bidding and defensive problems.A special request for Kungsgeten: On your site, please insert drop boxes To allow approved members to cut and paste a lump of text into the box, so thatYour clever software can reformat it as FD (or HTML or PDF or whatever) andDump the result in another drop-box (or email it or whatever) Quote Link to comment Share on other sites More sharing options...
Siegmund Posted October 31, 2013 Report Share Posted October 31, 2013 If I had to pick one of the mentioned alternatives I would take "PBN-style, but separate the hands on different rows." I also like having every hand occupy exactly the same number of characters whether it has a void or not, so would lean against requiring "-" for a void. The price you pay for avoiding that is having to put in punctuation.When possible try to avoid extra characters, especially ones that are hard to type: "S:xxx H:xxxx D:xxx C:xxx" would drive me batty, not just for 8 extra characters, but for the 4 colons requiring a shift-key. Ideally, case-insensitive, so I don't have to worry about capitalizing A K Q J T just to get capital letters in the printout. At the cost of having to use a symbol for a void (unless you are willing to treat two spaces as different than one space), Kungsgeten's last two alternatives can both become usable if spaces and carriage returns are treated the same way by the parser. Whatever you choose, try to keep it thematic with the rest of the language. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.