Giter Club home page Giter Club logo

snake's Introduction

snake Build Status

A terminal interface for Snake. This is kind of a toy program, written as a demonstration of the brick library.

It is part of my Introduction to Brick tutorial. Feel free to leave issues here or on samtay/samtay.github.io if you spot any issues or want to leave feedback.

installation

Installation on MacOS can be accomplished via homebrew:

brew install samtay/tui/snake

Arch Linux users can install from the AUR:

yay -S snake-terminal-git # or yaourt -S snake-terminal-git, etc.

Others can install from source with stack:

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.

snake's People

Contributors

oldfartdeveloper avatar samtay avatar sgoedecke avatar xiaoxiae avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

snake's Issues

paused v. frozen

I love this code! Thanks!

Why does the game have both paused and frozen properties?

Comple error probably due to more recent vesion of Brick

Getting the following compile errors:

src/UI.hs:12:47: error: Module ‘Brick’ does not export ‘Next’
   |
12 |   ( App(..), AttrMap, BrickEvent(..), EventM, Next, Widget
   |                                               ^^^^

src/UI.hs:14:5: error: Module ‘Brick’ does not export ‘continue’
   |
14 |   , continue, halt
   |     ^^^^^^^^

This is using brick-2.3.1.

I tried downgrading the brick dependency and got down to brick-1.15 (which required that I change from ghc-9.6 to ghc-9.2) but then ran into other problems compiling vty.

I would greatly appreciate it if snake could be upgraded to build with the latest brick release on Hackage and ghc-9.6 or later.

No instruction on how to start playing

Okay, this caught me; I gave up because, after launching the game, the game appeared and nothing moved. I tried everything for the longest time except hit an arrow key.

So, I've added an instruction in the README to simply start the game by pressing an arrow key. I'll submit a PR immediately with the change.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.