# nix-snake âī¸đ
A lightweight, terminal-based Snake game and screensaver written in Rust.

Watch a NixOS Lambda (Îģ) navigate your terminal, consuming snowflakes and
packages in an infinite loop, or take control and play yourself.
**Status: Active Development** đ§
---
## ⨠Features
- đĨī¸ Screensaver Mode (Autopilot): The snake plays itself using a greedy
pathfinding algorithm. Perfect for a terminal background.
- đŽ Seamless Override: Press any arrow key to instantly switch from
"Screensaver" to "Manual" mode. Press a to switch back.
- âī¸ NixOS Themed: The snake head is a Lambda (Îģ), eating snowflakes (â) and
packages (đĻ).
- đ Performance: Built with pure crossterm for low-latency rendering and
minimal resource usage.
- đ Infinity Walls: The world wraps around the edges of your terminal.
---
## đĻ Installation From Source
Ensure you have Rust and Cargo installed.
```bash
git clone https://github.com/saylesss88/nix-snake cd nix-snake
cargo install --path .
```
crates.io
```bash
cargo install nix-snake
```
Nix:
```bash
nix run github:saylesss88/nix-snake
# If it gives you problems try:
nix run --no-write-lock-file github:saylesss88/nix-snake
```
---
## đšī¸ Controls
- `a`: Switch to Autopilot (Screensaver) Mode
- `q`/ `Esc`: Quit
- Arrow keys: Start playing
- The speed gets faster with every package/snowflake eaten
- The screen flashes red on death & auto-restarts with a body length of 3