Skip to content

PyAISnake v2.0.0 - CLI Version

Choose a tag to compare

@chelslava chelslava released this 27 Mar 23:03
· 20 commits to master since this release

πŸŽ‰ Major Release - Complete CLI Migration

BREAKING CHANGES

  • Removed tkinter GUI
  • Game is now CLI-only

New Features

  • Rich-based rendering - Beautiful terminal UI with Unicode/ASCII support
  • Keyboard input - Cross-platform real-time input handling
  • CLI commands:
    • pyaisnake play - Play manually
    • pyaisnake ai --visualize - Watch AI play
    • pyaisnake train --algorithm neural - Train AI
    • pyaisnake stats - View statistics
  • AI algorithms: A*, Neural Network, Genetic Algorithm, Random

Installation

uv sync
uv run pyaisnake play

Controls

  • Arrow keys / WASD - Move
  • P / Space - Pause
  • R - Restart
  • Q / Esc - Quit

Tests

  • 12 tests for game engine
  • All passing

Structure

pyaisnake/
β”œβ”€β”€ engine.py      # Pure game logic
β”œβ”€β”€ renderer.py    # Rich CLI rendering
β”œβ”€β”€ controller.py  # Keyboard input
β”œβ”€β”€ cli.py         # Entry point
└── ai/            # AI algorithms