GithubHelp home page GithubHelp logo

samtay / snake Goto Github PK

View Code? Open in Web Editor NEW
59.0 6.0 20.0 73 KB

A terminal interface for Snake

Home Page: https://samtay.github.io/articles/brick.html#snake

License: Other

Haskell 100.00%
snake-game haskell haskell-tutorial brick vty terminal-game

snake's Introduction

Hi there 👋

  • 🦀 I like writing code, typically in Rust these days.
  • 📋 I write infrequently at samtay.github.io.
  • 💎 I write more frequently in obsidian, but not for public consumption.

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.