PvP Chain reaction game using Python
At last, I've taken time and ventured a little deeper into the Python language! I used the Tkinter package to develop a rip-off of an android game called chain-reaction. It's a simple multiplayer board game in which the first person to occupy all the blocks on the board or of the opponent(s) wins. Try downloading and playing the game with your friends, it's FUN!
Here's a video of the game I've developed(I've set the number of players to 4 and board dimensions are 6*8):
Coming to the coding, I actually enjoyed the process of writing code much more in Python compared to any other previous languages that I've used. Maybe it is due to the fact that it's the first high-level language that I got my hands on. I'd never worked with Tkinter package before. It was quite easy to understand and I was able to build the game in roughly in four hours. I think that just a little effort is enough for anyone to understand how to use the tkinter package.
Talking about the game it's quite simple to understand it if you play it. Simply speaking, if a block reaches its maximum capacity then it diffuses the contents to its neighbors(North, East, West, and South). A little bit knowledge about recursion can help you code the game with ease.
Here's the code for the game:
I could have used the random package to implement a bot(an opponent) that randomly selects tiles and make the game a little more interesting. But my aim was to just fiddle with the tkinter and I'm happy with the end result.
If you have a Python IDE go ahead and try to run the code and have fun :) (You can modify the code to adjust number of players and the dimensions of the board)