--- title: Pac-Man emoji: 🟡 colorFrom: yellow colorTo: blue sdk: static pinned: false license: mit short_description: Classic Pac-Man in Python/pygame, compiled to WebAssembly --- # Pac-Man (pygame → WebAssembly) A classic Pac-Man clone written in ~250 lines of Python using pygame, compiled to WebAssembly with [pygbag](https://pygbag.readthedocs.io/) so it runs in the browser. ## Controls - **Arrow keys** — move (click the game first to give it keyboard focus) - **R** — restart after game over ## Features - Maze with dots (10 pts) and power pellets (50 pts) - Power pellets make ghosts frightened: blue, slower, worth 200 pts - 4 ghosts with simple chase AI - 3 lives, win screen when the maze is cleared ## Source Desktop version and source: https://huggingface.co/ruthlesslearner/pacman-python