Your Old Buddy, Snake – Slithering Through Your Terminal!
Project description
Your old buddy, Snake, slithering through your terminal! (WIP)
Player Section
Key Features:
- It's Fun! Why not play a game of Snake while compiling code inside your terminal?
- Cross-Platform: Works seamlessly on any operating system and terminal thanks to Textual.
- Vim Lover Support: Move your snake with WASD, arrow keys, or HJKL.
- Pretty Snakes: Choose from a palette of 20 colors for your snake’s body.
- Game Controller Support (Experimental): Play Snake using the arrows on your game controller.
- Local Multiplayer (Coming Soon): Play Snake on your couch with a buddy—team up or compete.
- LAN Party (Coming Soon): I see, you are a pro player... No need to share your PC with filthy casuals!
Needed Tools
For Windows:
- Python Installation:
- If you don’t have it installed, download Python from the official website.
- During installation, make sure to check the checkbox that says “Add Python to PATH”.
- Install
Scoop:- Scoop is a command-line installer for Windows. If you don’t have it installed, follow the instructions on the Scoop official website.
- Install
pipx:
scoop install pipx
pipx ensurepath
For macOS:
- Install
Homebrew:- Homebrew is a package manager for macOS. If you don’t have it installed, follow the instructions on the Homebrew official website.
- Install
pipx:
brew install pipx
pipx ensurepath
For Linux:
- Install
pipx:- Install pipx using your package manager.
FocusTUI Installation (every OS)
Once you have pipx installed, you can easily install tui-snake:
- Install
tui-snake:
pipx install tui-snake
Run the App
After installation, you can start tui-snake by typing:
tuisnake
Dev Section
This is my experimental repo where I break a few rules and test different approaches.
Guidelines & Rationale:
-
The entire app is built inside one file (.tcss does not count).
I used to split code into many modules. Then, I saw msgspec, a single file with 20K lines. I wondered: is this a good practice? Is maintaining such a codebase difficult?
-
No unit tests unless absolutely necessary.
Unit tests create tons of dead code. Instead, let’s focus on writing more features. The app should work as a whole, not just individual procedures. A holistic view of the system is preferred.
-
No code comments unless the code is tricky or unreadable at first glance.
The API should be logical and easy to use. If I need comments, I should simplify the code instead.
-
No linters.
I want to develop my own coding style by reviewing the code myself, not following linters’ orders.
-
Code should be "static" – no type mixing.
Static typing has its benefits. Mixing types makes the code harder to work with.
-
Big procedures.
Splitting one big procedure into many smaller ones makes navigation harder and increases the call stack.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tui_snake-0.0.3.tar.gz.
File metadata
- Download URL: tui_snake-0.0.3.tar.gz
- Upload date:
- Size: 237.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f4c9325762be76bc0fdb167bb023a00a66d3f2598b46e890ccb1d69bb83c190a
|
|
| MD5 |
a8e59cc5d259b5028502fbc7e3cd9c9b
|
|
| BLAKE2b-256 |
9c811c3e3ac95e0a2a476789bcacb2a7a493ad98494fe701c5c0855f9a84f4bd
|
File details
Details for the file tui_snake-0.0.3-py3-none-any.whl.
File metadata
- Download URL: tui_snake-0.0.3-py3-none-any.whl
- Upload date:
- Size: 235.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a5998a54a118c76d27cd8a013e6ee1a4b03ba62de76cb0e05978064b53aa818f
|
|
| MD5 |
b6c731e3cfb2990088dca9bd32bc8cd5
|
|
| BLAKE2b-256 |
a0d3cf3a00f11dc1f3b1afba40af9b80717f31f10342c8aa570b7e55874c45a4
|