Python Chess, Version 0.1

So, gentle reader, you probably think I’ve been quite lazy.  Not true – here’s a working game in Python!  As you might guess from the title, I’ve made a little chess game.  It is pretty simple and has no graphics.  Ah, well – you have to start somewhere!   Right now Python Chess supports two players; no AI opponent yet.  Input is via keyboard entry.

It was pretty easy to code – 458 lines, took me about 5-10 hours (an hour here and there over a few days) from start to finish.  Before starting, I had read through the tutorial on the Python website and consulted it when I needed to get specific syntax for something.  

I didn’t have any large design errors, largely thanks to a solid understanding of the (relatively simple) game mechanics.  The game of chess is pretty well defined in my head; for future development of other, more complex games, I think it will be more important to spend some serious time up front generating a design document.  I didn’t do that for Python Chess because it’s pretty simple…just kind of added functionality as I decided it was needed.  I know, I know…terrible programming practice!

Screenshot of Python Chess

Screenshot of Python Chess

Download: Python Chess version 0.1  (Note: for some reason, if you try to Right-click – Save As and download this file, Google Sites will scramble the file name.  If you would like, you I put a zip file up as well…it’s name will get scrambled, too, when you save but when you unzip it the names of the files inside are intact.)

You’ll need the Python interpreter to run this file.  If you don’t have it, you can get it for free from http://www.python.org/download/.

Advertisements

One response

  1. Thanks for providing this python chess program to us.
    I hope you can finish your “To Do” list soon.
    I am planning to use it to teach my kid how to program using python since he loves Chess game.

What do you think?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: