About this project

mujiu-games is a pure frontend mini-game collection, hosted at game.mujiu.net. The project is defined by zero dependencies and zero build steps: every game is a standalone single-file HTML document with inlined CSS and JavaScript, references no external resources, and can run immediately once placed in an nginx static directory. Entry page: The index.html file in the root directory is a terminal emulator, with the prompt set to [email protected]:~ $. When opened, it automatically runs ls games/ to list all available games, and every list entry is directly clickable. It supports the ls and clear commands, as well as direct navigation by typing any game name (for example, type snake and press Enter). It also supports Tab completion for built-in commands and game names, up and down arrow keys to scroll through command history, and automatic input box focus when any position on the page is clicked. There are 8 games in total: snake (Snake), tetris (Tetris), 2048, flappy (Flappy Bird), minesweeper (Minesweeper), breakout (Breakout), gobang (Gomoku), tictactoe (Tic-tac-toe). How to add a new game: Create a directory named for the game, with an index.html file inside, keeping the file self-contained as a single document with no external resource references; then add an entry line to the games array in the root index.html, where the entry order determines the display order, with three fields: name, label, and url. Deployment: Simply sync the directory as a static site. The example provided in the README uses rsync to sync files to the server path /var/www/game/, excluding .DS_Store files. The nginx configuration is available at deploy/nginx.conf, with the site root set to /var/www/game. The License section notes that this is a personal project, and its code is free to reference for any purpose.