[ProgClub list] ai-checkers in jj5-test
John Elliot
jj5 at progclub.org
Sun Oct 16 21:01:04 AEDT 2011
On 16/10/2011 4:04 PM, sanguinev at progsoc.org wrote:
> I don't have time to read the code in detail (specially with limited
> comments)
Well I've commented the code now, so you can't use that as your only
excuse. :)
http://www.progclub.org/pcrepo/jj5-test/trunk/ai-checkers/checkers.c?view=markup
You might need to press Ctrl+F5 in your browser to force a reload of
that web page. The caching seems to be fairly aggressive in ViewVC.
This is a pretty good excuse to learn a little about C. If you're
interested in working on the code what I'm up to is:
* determining if 'jumps' can be made, and if so requiring them as the
next moves
* making sure that after a jump that you jump again if you can during
your current move
Those two things are each a little tricky and will require a remodelling
of the code. I have four passing unit tests that test for simple moves,
and one failing test that tests for a complicated king jump (that is
test_5).
To run the code:
* SSH to one of the ProgClub user machines
* In your home directory:
$ mkdir test
$ cd test
$ svn co
https://www.progclub.org/svn/pcrepo/jj5-test/trunk/ai-checkers ai-checkers
$ cd ai-checkers
$ chmod +x test compile
$ ./test
If you want to edit the code on your own workstation then just check it
out from the above URL using TortoiseSVN (or other svn client) and then
check in. Then back on the ProgClub server:
$ svn update && ./test
More information about the list
mailing list