Giter Site home page Giter Site logo

match-game's Introduction

Match Game

A clojurescript webapp to exercise core.async library by sending keyborad events to an input channel while also allowing sending commands from a browser connected repl.

For demo see: http://wbabic.github.io/match-game/

Overview

Use an event stream input channel to transform a source object to match a target object. Events can come from browser as well as from a browser connected repl. Events are transformed into commands to separate GUI events from the application.

Usage

cljs

lein cljsbuild auto dev
lein cljsbuild once advanced

clojure repl

From within Eamcs, M-x cider-jack-in. see https://github.com/clojure-emacs/cider (formerly nrepl.el)

browser repl

(in-ns 'async-play.web.play)
@vertices
(sigma)
(position :v1 square)

using cljsbuild

lein trampoline cljsbuild repl-listen

see https://github.com/emezeske/lein-cljsbuild

using piggieback

from a clojure repl

user=> (require 'cljs.repl.browser)
user=> (cemerick.piggieback/cljs-repl :repl-env (cljs.repl.browser/repl-env :port 9000))

from the browser repl:

cljs.user=> (.log js/console "hello")
cljs.user=> (js/alert "Hello from a browser connected repl")

see https://github.com/cemerick/piggieback

web server

simple server

start simple server from shell:

$ cd resources/public
$ python -m SimpleHTTPServer 8888

then go to: http://localhost:8888/hello.html

clojure server

Resources

core.aync

cljs

canvas

License

Copyright © 2013 Walter P Babic

Distributed under the Eclipse Public License either version 1.0 or (at your option) any later version.

match-game's People

Contributors

wbabic avatar

Watchers

 avatar

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.