This is a two-player version of Riichi Mahjong.
See http://pwmarcz.pl/minefield/ (where the project is currently deployed) for more details.
The project is available under MIT license. See COPYING for more details.
Required packages (as of Ubuntu 14.04):
python-dev
libevent-dev
libpcre3-dev
nodejs
npm
You also need a recent Node.js version.
Install libraries:
$ cd server
$ make
Make targets are:
make static- recompile static assetsmake watch- recompile static assets on each changemake serve- serve the website in development modemake serve_prod- serve the website in production mode
$ make watch
$ make serve
then browse to localhost:8080.
make test- run Python (server) testsmake test_js- run JavaScript testsmake watch_test_js- run JavaScript tests on each change
Minefield is currently a static web page plus a WebSocket server. To deploy Minefield, you need to:
- run
make serve_prod, which serves the WebSocket part on port 8080, - serve the static files under a given location, for instance
/minefield/, - serve the WebSocket under the
wspath, for instance/minefield/ws.
Here's an example configuration for nginx:
location /minefield {
/path/to/minefield/client/static;
}
location /minefield/socket.io {
proxy_pass http://127.0.0.1:8080/ws;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
# Prevent dropping idle connections
proxy_read_timeout 7d;
}