terminal-water-sort
v1.0.2
Published
CLI water sort puzzle for terminal
Downloads
355
Maintainers
Readme
Terminal Water Sort
Terminal Water Sort is a command-line water sort puzzle game.
Screenshot

Features
- Vertical bottle rendering with Unicode lines
- ANSI color display with fallback text symbols
- Simple move input in
<from> <to>format (example:1 2) - Random rounds with 10 bottles (8 filled, 2 empty at start)
- Continue playing after clear (
nfor next round,qto quit)
Requirements
- Node.js 20+
Quick Start
Run instantly (recommended)
npx terminal-water-sortInstall as a command
npm install -g terminal-water-sort
terminal-water-sortHow to play
- Goal: every bottle must be either empty or full with one color only
- Move input:
1 2means pour from bottle 1 to bottle 2 - A move is valid when:
- source bottle is not empty
- destination bottle has free space
- destination is empty, or top colors match
- Continuous top layers of the same color move together as much as possible
- After clear, the game stays open (
nfor next round,qto quit)
Commands
1 2pour from bottle 1 to bottle 2rrestart current roundnstart a new random roundhelpshow command listqquit game
License
MIT License. See LICENSE.
