https://github.com/forgottosave/snash
The popular game snake completely programmed in bash... snash
https://github.com/forgottosave/snash
bash snake snake-game
Last synced: about 2 months ago
JSON representation
The popular game snake completely programmed in bash... snash
- Host: GitHub
- URL: https://github.com/forgottosave/snash
- Owner: forgottosave
- License: mit
- Created: 2022-12-28T18:04:00.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-02-27T21:44:03.000Z (over 2 years ago)
- Last Synced: 2024-02-28T14:46:12.945Z (over 2 years ago)
- Topics: bash, snake, snake-game
- Language: Shell
- Homepage:
- Size: 26.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README

**Snash** is my recreation of the popular game **snake**, but using only the programming language **bash**, that you can run in your linux command line.
This project helped me get started with a bit more advanced bash in 2022, which is probably the reason why this might not be the most beautiful bash code style you've ever seen, but it works completely fine :) It also was a lot of fun to use to set up my first own git-project with license and everthing. Hello Open Source :D
## Install and Run
1. Make sure to download all the files, including the resource folder. The easiest way is just to clone this repository:
```
git clone https://github.com/forgottosave/snash.git; cd snash
```
2. Make sure the `snash.sh` file is executable
```
chmod +x snash.sh
```
3. Run the game as you would run any bash file
```
./snash.sh
```
## How to Play
You find the general information when adding the flag `-h` when executing the program. Still here are some explanations:
**Goal**
- Reach the highest score possible.
- Eat apples (green O) to get more points. Letting them rot (not eating them in time) results in minus points.
- Don't run into yourself or into a wall, it'll kill you ;)
- Have fun!
**Control**
- During game: Change direction with w,a,s,d (or vim-h,j,k,l)
- Before game: Change difficulty with the option `-d `, where number can be any positive value (although 1-10 is recommended). Not providing the difficulty sets it to the default (5).
- Also try the in-terminal mode... you can eat through your whole screen :)
## Gallery
**Default Mode**

**In-Terminal Mode**