make psyco entirely optional by putting it in a try/except block.
change INITIAL_BOARD to be a triple-quoted string.
you seem to mostly follow pep8, which is all most folks ask, but i
really like this style for docstrings:
def test():
''' hello,
this text and the quotes line up
very nicely
in a monospace font.
'''
return
pep8 says function names shouldn't be capitalized, and use underscores
to separate words, so they can be distinguished from classes [which are
CamelCase] quickly.
i would make a few small functions inside adjudicate for each cmd case,
then make a dict mapping 'fen' to the function fen, 'reset' to the
function reset, etc. faster and more modular.
Will McGugan wrote:
Hi folks,
I have just blogged about a Python chess module of mine that I wrote a
while back. I plan on using it for a commerical project, but making the
module open source. So I would be interested in comments / advice
reagarding programming style and also optimization.
http://www.willmcgugan.com/2006/06/18/chesspy/
Regards,
Will McGugan
--
work: http://www.kelpiesoft.com
blog: http://www.willmcgugan.com