[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[pbmserv-dev] game.cpp change
I recently needed to create some scramble "tournament" boards and
the existing "pool" code (which reads a skeletal '.example' board as
a guide) was not up to the task.
I didn't want to have to create the boards by hand, and then have to
rename them, etc. etc.
So I modified the Challenge() behaviour to look for a file called
~/games/GAMETYPE/.special
if present, the function uses the contents of that file as the
boardno, and then removes the .special file.
if not present, it uses the contents of .board (incremented, of course)
so now I just need to tweak the pool script to touch the .special
file with the board number and then invoke
~/bin/GAMETYPE challenge PLAYER1 PLAYER2
one other thing that needs doing is... if the board IS .special,
ignore the limits code... I had to hand modify sharkey's limit for
him to get all the boards in the tournament. "limits" should be
used to prevent random other players from challenging you too often.
--
/ \__ | Richard Rognlie / Sendmail Ninja / Gamerz.NET Lackey
\__/ \ | http://www.gamerz.net/~rrognlie <rrognlie at gamerz.net>
/ \__/ | The early bird gets the worm
\__/ | But the second mouse gets the cheese