Pac-Man in Python

A classic Pac-Man clone written in ~250 lines of Python using pygame.

Run locally

pip install pygame
python pacman.py

Controls

  • Arrow keys โ€” move
  • R โ€” restart after game over
  • Q or Esc โ€” quit

Features

  • Maze with dots (10 pts) and power pellets (50 pts)
  • Power pellets make ghosts frightened: they turn blue, slow down, and are worth 200 pts when eaten
  • 4 ghosts with simple chase AI (they pick the direction toward Pac-Man at each intersection)
  • 3 lives, win screen when the maze is cleared
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support