https://github.com/samtay/snake
A terminal interface for Snake
https://github.com/samtay/snake
brick haskell haskell-tutorial snake-game terminal-game vty
Last synced: 9 months ago
JSON representation
A terminal interface for Snake
- Host: GitHub
- URL: https://github.com/samtay/snake
- Owner: samtay
- License: other
- Created: 2017-06-27T03:29:43.000Z (over 8 years ago)
- Default Branch: main
- Last Pushed: 2024-05-03T22:35:13.000Z (over 1 year ago)
- Last Synced: 2025-04-01T12:04:05.964Z (10 months ago)
- Topics: brick, haskell, haskell-tutorial, snake-game, terminal-game, vty
- Language: Haskell
- Homepage: https://samtay.github.io/articles/brick.html#snake
- Size: 71.3 KB
- Stars: 61
- Watchers: 5
- Forks: 20
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# snake [](https://github.com/samtay/snake/actions/workflows/ci.yaml)
A terminal interface for Snake. This is kind of a toy program, written as a demonstration of the
[brick](https://hackage.haskell.org/package/brick-0.18) library.
It is part of my [Introduction to Brick](https://samtay.github.io/posts/introduction-to-brick)
tutorial. Feel free to leave issues here or on
[samtay/samtay.github.io](https://github.com/samtay/samtay.github.io)
if you spot any issues or want to leave feedback.
## installation
Installation on MacOS can be accomplished via homebrew:
```shell
brew install samtay/tui/snake
```
Arch Linux users can install from the [AUR](https://aur.archlinux.org/packages/snake-terminal-git/):
```shell
yay -S snake-terminal-git # or yaourt -S snake-terminal-git, etc.
```
Others can install from source with [stack](https://docs.haskellstack.org/en/stable/README/#how-to-install):
```shell
git clone https://github.com/samtay/snake.git
cd snake
stack install snake
```
If you are on Debian and want to install via package manager, feel free to open an issue and I'll try to get around to it.
## playing the game
After launching the game, press any of the arrow keys or the letters 'k', 'j', 'l', or 'h' to start the game.