https://github.com/psykulsk/shnake
Simple snake game in bash
https://github.com/psykulsk/shnake
bash bash-game bash-script bash-scripting game shell shell-script snake snake-game snakegame terminal-game
Last synced: 4 months ago
JSON representation
Simple snake game in bash
- Host: GitHub
- URL: https://github.com/psykulsk/shnake
- Owner: psykulsk
- License: mit
- Created: 2020-03-15T01:46:30.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-10-17T18:34:04.000Z (over 1 year ago)
- Last Synced: 2025-04-15T07:19:22.168Z (about 1 year ago)
- Topics: bash, bash-game, bash-script, bash-scripting, game, shell, shell-script, snake, snake-game, snakegame, terminal-game
- Language: Shell
- Homepage:
- Size: 916 KB
- Stars: 3
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# shnake
Feeling your eyelids droop during that never-ending meeting? Or maybe you're on your server, bored out of your mind?
Shnake is here for you!
```
curl https://raw.githubusercontent.com/psykulsk/shnake/master/shnake.sh -o shnake.sh && \
bash shnake.sh
```
```
usage: shnake.sh [-c cols ] [-r rows] [-s speed]
-h display help
-c cols specify game area cols. Make sure it's not higher then the actual terminal's width.
-r rows specify game area rows. Make sure it's not higher then the actual terminal's height.
-s speed specify snake speed. Value from 1-10.
Exitting with Ctrl-C automatically cleans the terminal.
```
Requires `bash --version` >= 4.0. **Warning**, MacOS is distributed with bash 3 by default. Check the [instructions](#upgrading-bash-on-macos) on how to upgrade it.
### Other bash games
* [tetri.sh](https://github.com/psykulsk/tetri.sh)
### Demo

### Upgrading bash on MacOS
* Install a new version of bash using brew: `brew install bash`
* Add `/opt/homebrew/bin/bash` to `/etc/shells`
* Set is as default with `chsh -s /usr/local/bin/bash`