Skip to content

dnovikoff/mahjong-api

Repository files navigation

mahjong-api

CI Coverage Status Go Report Card

Start the log server

In memory mode

go run ./cmd/log-server --config ./cmd/log-server/data/memory_config.yaml

or in file mode (files will be in ./logdb folder)

go run ./cmd/log-server --config ./cmd/log-server/data/file_config.yaml

Or write your own implementation to collect logs, generated by mahjong-server

Start mahjong-server

Update to the latest version docker pull tempai/mahjong-server:latest

Run the server docker run -t -i -p 9090:9090 --rm tempai/mahjong-server:latest

The code for mahjong-server is private. Take note, that the mahjong-server is not allowed to be used as a part of commercial/non-commercial online mahjong server without authors permission. Could be used for such scenarios as: AI training, testing, research.

Please contact me or open an issue in case of found bugs in mahjong-server work.

Run example client

go run ./cmd/example-client --config ./cmd/example-client/data/config.yaml

The client will run a game with a bot and report a log to the log-server

Alternative run with docker-compose

docker-compose up --abort-on-container-exit