An implementation of the Bid Pitch card game. The goal is to allow me and my family to play online while we're scattered across the country. Based on Lockport, NY local rules.
Another goal of this project is to make use of interesting technologies. The server is written in Clojure and the client is written in ClojureScript. Game logic is shared between them using cljc.
Websockets handle most of the client-server communication. Http-kit provides good websocket implementation and James Henderson's Chord provides a nice core.async wrapper. I'm not sure if it was necessary but it was very convenient.
On the front-end I experimented with Facebook's React.js. I initially used Om as a ClojureScript interface, but that is no longer being actively maintained, so I moved to Reagent. The Hiccup syntax definitely feels like an improvement.
You will need Leiningen installed.
To start a web server for the application, which will be available on port 8080 by default, run:
lein run
Additionally, to enable live reloading of ClojureScript and CSS via Figwheel, run:
lein figwheel
The game uses a secure WebSocket (wss://
) which requires some configuration to
work properly on localhost. The local-dev
branch changes the WebSocket to be
insecure (ws://
) so it will work out-of-the-box for local development.
- Bidder goes out
- Teams
- Switch players/teams after game
Released under the MIT license.
Copyright © 2014 Timothy Licata