Hukum is a card game invented (I think) in India. It appears to only be played it Northern Karnataka, where my family is from. I'm not sure how or when it started, but my family has been playing it for the past 100 years at least.
I have implemented a playable web version of the game made, available at https://hukum.gigalixirapp.com/
The codebase for the game is made up of the following components:
- hukum-engine: An Elixir application that handles all the logic of the game. It receives incoming actions, such as a player passing or calling, or playing a card, and decides what to do next, returning a new game state at each step. This will be well-documented soon, because we need a master account somewhere of all the rules of Hukum!
- hukum-socket-api: This is a Phoenix app that establishes websocket connections between players, sends their actions to
hukum-engine
and broadcasts the new state at each step. - hukum-elm-client: A frontend for the websocket server, written in Elm.
Here's what the web version looks like.
This is the lobby.
This is a game.
To run the game locally, you may do the following:
- Clone hukum-elm-client and hukum-socket-api
- In the
hukum-socket-api
directory, runmix deps.get
and thenmix phx.server
- In the
hukum-elm-client
directory, runelm-app start
- Visit
localhost:3000
Note that you will need 4 players to start a game.