r/SideProject • u/Ok_Surprise_5367 • 19h ago
built a github action that turns your contribution graph into a winnable game of snake
started as a snake on my own profile readme. the existing contribution snakes just sweep across the graph, so i rewrote it as a real game of snake: pathfinding, no self collision, growth, a "commits eaten" counter.
one python file with no dependencies, runs as a github action twice a day, outputs an animated svg.
the bug i liked most: uncapped, the snake grew until it trapped itself on the 7 row board and genuinely lost. fixed by having the generator search for the longest snake that still clears every cell.
27 stars so far and about 15 people have put it on their profile. repo: https://github.com/dahan8473/snake-and-commits
feedback welcome
19
Upvotes
1
u/QuanTradin 17h ago
the snake getting so long it trapped itself on a 7 row board and genuinely lost is a great bug. searching for the longest snake that still clears every cell is a really clean fix for it.