New Game Source Code: Gemgem (A Bejeweled clone)
Here’s the source code for a Bejeweled clone called Gemgem, written in Python with the Pygame library. You’ll need Python (2 or 3) and Pygame installed to run it. I’ve tried to keep the source code simple so it’s easy to follow and learn programming and Pygame from it. It comes in under 540 lines of code, including whitespace & comments.
Download the Gemgem source code and graphics.
To play, click on (or drag over) two adjacent gems to swap their position. You need to swap them so that there are three or more gems of the same type in a row. This causes the gems to disappear and new gems to fall in their place. You get more points for chain reactions or more-than-three matches. The score constantly trickles down, so solve as fast as possible. The game ends when no more moves can be made.
The backspace key will reset the board, the escape key quits.
The graphics were from Osmic on opengameart.org

Danimal:
June 24th, 2011 at 7:21 pm
Thanks for sharing this — it’s always interesting to see how different coders approach games.
Reen:
July 31st, 2011 at 4:23 pm
Thank you very much
i have seen the book by accident
i love it <3
and i didn't thought it has a lively useful blog
how awesome !!
Marijan Sivric:
October 4th, 2011 at 7:22 am
Great source! Thanks for sharing man! And thanks for writing one of the best Python books EVER!!!
Marijan Sivric:
October 6th, 2011 at 12:56 am
BTW How to compile this with Eclipse? I can only compile it with a standard Python interface… :(
Emmanuel:
January 24th, 2013 at 1:00 am
Everytime I like to read your cmment but i have asegnment for develop Bejeweled gamme in java object oriented.who can help me to develop that game in Java?can you send me your email dress?Iwant to send you that work on your email.God bless you
mansur:
January 29th, 2013 at 3:21 am
can i make this in to a executable file and how ?