nanopython / games
Games
Six classics, each written three ways against a small shared library (nanopy.py for Python, nanopy.js for JavaScript). Same game, same library shape, different writing style. See the comparison report for code-line counts and a verdict.
Pick a variant to play it. Each row is one game with three flavors:
Kid — Python, module-level functions, no classes or decorators
Pro — Python, classes +
@on_key decorators + Ticker
JS — JavaScript, same library API, same writing style as the kid version
Snake
The classic. Eat the apple, grow longer, don't hit the walls or yourself.
Memory match
4×4 grid of color-pair cards. Click to flip, find all eight pairs. The first demo to use the new mouse + sound + collision-helper APIs in nanopy.py.
The un-refactored snake/ is also still here as the comparison reference — same game without the library. See the report for what changed.