My spouse bought a small game for my youngest child called Pop It.
I wanted to make it in Python for fun, enjoy playing Pop It in your terminal!
I searched the internet and did not find the "real" rules for this game, so here are the ones we use:
- The last player to pop a bubble loses the game
- You can't pop more than 3 bubbles in one turn
- You can't pop all the bubbles in an empty row
P.S. If you play the bot, the difficulty is the number of half moves it can see in advance (depth of the minimax algo).
I use simplejson to r/w in the game positions dict.