Giter Site home page Giter Site logo

snake.hjkl's Introduction

Snake -HJKL->

This is a simple snake game where you must use the keys h, j, k and l in order to eat some pills.

You can play it right now if you click here.

This game is based on a true story.

Running It On Your Local Machine

You need the clojure-cli tool to build the project. You might have it if clojure is installed on your machine.

Then, simply run clojure -M:dev.

Build

To build the game in resources/public, run clojure -M:prod:play-cljc.

Why using the keys h,j,k and l?

In many CLI and specifically Vim, you can use the keys hjkl to move around, instead of using the arrow keys.

The controls are:

  • h left
  • j down
  • k up
  • l right

Using hjkl won't oblige you to move your hands to reach the arrow keys. It might sound silly, but it's really nice when you're used to it.

To teach people to do so, I developed this Snake game where you must use hjkl to move the snake.

I speak about all of that in more details in my blog article Is Vim Really Not For You? A Beginner Guide.

Inspiration

I used a lot of the code from this snake.

That's all?

This is my first ClojureScript project. It helped me learn the language, and it pushed me to think about functional stuff, like pure function, states and such.

snake.hjkl's People

Contributors

phantas0s avatar

Stargazers

 avatar Tulio Leao avatar Paulo Vicente avatar Phelipe Teles avatar Denis Kipchakbaev avatar György Andorka avatar Adrian Smith avatar Joseph Hurtado avatar Jonas Elan avatar

Watchers

Abhik Khanra avatar James Cloos avatar  avatar  avatar

Forkers

paramtapmewada

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.