xboard-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[XBoard-devel] Question: bughouse support


From: Arun Persaud
Subject: [XBoard-devel] Question: bughouse support
Date: Sun, 25 Jul 2004 23:45:21 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7) Gecko/20040616

Hi,

got a question about the best way to add some bughouse support, if you not interested in it, just skip this email :) it got a bit longer than I thought, sorry... ;)

a while ago I added some bughouse support to my version of xboard (for FICS). I just added in backend.c a parser in read_from_ics which looks out for thinks like:

if(looking_at(buf,&i, "* agrees to be your partner")|| ... or other bughouse related messages

and opens a second xboard with StarChildProcess (not iff already running of course). I then logged in a guest and started following the partner game of either me or if I observe a game of that guys partner... the moment the game was over and an unobsever or end of partnership was announced it closed the second window. Worked quite well for me, but I just tried it out again(after not playing bughouse online for a while) and found out that FICS closed the guest accounts :( which kills my bughouse support...

now I guess, if the quick and dirty hack with the guest account wouldn't have worked, I would have realised that I could have just done everything in one FICS session: start the second window as usual, observe partners game my own session, forward positions of partners game to second board... I just had another look at the source and figured that I could find my partners game by adding some lines to

    if (looking_at(buf, &i, "* *vs. * *--- *")) {...

which is also in read_from_ics to check if it's my partners game... but I'm not sure where to go from there.

questions:

A) how would I get the second board into ics mode, so that it also checks read_from_ics, in which case I guess I could just copy the move info into the FDin of that process and it would automatically be displayed... or is there another way to get xboard parse game positions which come from an ICS?

B) I would need to store the name of the bughouse partner somewhere, where would be the right place? gameInfo is just valid for on game, or? But putting it in appData, doesn't sound right either...

C) I added a boolean to appData to check if the second window is open or not. is that where it should be?

I wouldn't mind posting the patch, if I get it to work... but since I don't have much time and am not that familiar with the xboard-code it might take a while...I also don't have access to ICS and to FICS only, so I can't really test it, same goes for other OS than linux...

I think xboard could need some more bughouse support though ;) and this should be a relatively easy thing, which I think I could add... BTW: would this way be platfrom independent(e.g. using StartChildProcess)? Really nice IMHO would be a jail with images of the pieces your partner has captures and not haveing it in the window-title.... ;)

Thanks
        ARUN -- is happy to see that work on xboard continues!









reply via email to

[Prev in Thread] Current Thread [Next in Thread]