[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[pbmserv-dev] Current Werewolf v1.5 code
Hi,
I tried to send this through last night but the attatchemnt made it too
big, and I woke up in the morning to find the bounce message in my
inbox. I've put the code up on some webspace I have access to, you can
get it from: http://homepage.ntlworld.com/othello/werewolf-code.tgz
But you probably should read the rest of the message first.
Geoff.
Original Message:
Hi,
Here is the current code, It's been a couple of days since I looked at it last
and unfortuanely at the moment it is not 'ready for primetime' and is infact
more broken than it was when I started. I probably tried to change too much
stuff between releases I do have a more functional, but less featureful,
version in my CVS repository somewhere, but I forgot to tag it :( so I'd have
to go a huntin'
The general gist is to have everything tested, and only implemented in a single
place, the old code seemes to have benifited from rapid cut and paste
development in places. So I've been adding lots of tests as I go. Not
everything is tested, but everything that is tested works. I'm assuming
anything that isn't tested doesnt work, but things probably aren't that bad.
Perhaps the best option for all you people with itchy fingers is to just to
hack on the existing (but running) werewolf code, and then I could port it
across to the new version when it is in a more stable state?
I do believe the new version is/will be a more stable base to build on. I'd be
interested in hearing from anybody who looks at the new version, It may just
be I'm deluded.
I feel a bit bad about promising things and not being able to deliver on them
at this moment. I was always too much of a 'starter' :) Need to work more on
being a finisher.
Anyway hopefully I've remembered to attatch the .tgz with the code and the
tests.
Please mail me with any questions, it's way past my bedtime.
Geoff.
kryten.
etc.
More technical info follows:
PbemGameBase.pm is now the base module
Werewolf.pm is the Werewolf module.
(Werewolf.pm now contains the guts of what was in werewolf-refactor.pl)
werewolf-refactor.pl is now just the shell that runs the werewolf code.
The tests need Test::Unit (which you can get from CPAN.)
(perl -MCPAN -e "install Test::Unit")
If you have Test::Unit.
You can run them by calling the relevant test function from the command line.
Each test_* file tests the correspoding .pm file.
./test_realgame reads a game history file (as output by the server at the end
of each message when a game is finished), and should play through each of the
moves and output the same game history again.
the "Test" directory contains the input/data files used for testing.
the "users" file should go in PBMHOME/etc
The code is full of FIXMEs and todos and badly named variables.
Anything called 'geoff' or 'bnv' (badly named variable) is just a placeholder.
Geoff Hubbard <ghubbard@ntlworld.com>
Friday 20th August 2004