Skip to content

mr-ema/shnake

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SHNAKE

Simple for-fun project of the classic snake game implemented in POSIX shell script.


Resources



Why POSIX Shell?

Why not, my friend! Sometimes, you just gotta shell-ebrate simplicity.



Features

  • Random fruit generation
  • Snake grow longer when eat the fruit
  • Full Collition detection
  • Simple interface with score counting
  • Configurable target FPS


Demo

Demo



Tested Shells

  • Zsh
  • Bash
  • Dash
  • Termux


Compatibility and Dependencies

This shell script is designed to be POSIX compatible, following the standards set by the POSIX specification. This means that it should run on any POSIX-compliant shell, which includes most Unix-like systems.

Dependencies

However, while the script adheres to POSIX standards, there are a few commands used that are not guaranteed to be available on all operating systems and you may need to install:

  • bc: The script uses bc (basic calculator) for performing precise floating-point arithmetic calculations. While bc is POSIX-defined and commonly available, it might not be installed on some minimal or specialized environments.

  • tput: The script uses tput to control terminal colors and cursor movement, enhancing the visual aspect of the game. Like bc, tput is POSIX-defined but might be missing on certain systems, especially headless or minimal installations.



How To Play

  1. Clone the repository.
  2. Open your terminal and navigate to the directory where the script is located.
  3. Make sure you have execute permissions for the script: chmod +x main.sh.
  4. Run the game: ./main.sh.


License

This game is released under the Zero-Clause BSD license. Feel free to use, modify, and distribute this software for any purpose with or without fee. The software comes "as is," and the author disclaims all warranties regarding its use. The author shall not be liable for any damages resulting from the use or performance of this software.

Releases

No releases published

Packages

No packages published

Languages