Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dnovikoff/mahjong-api

Riichi mahjong grpc api
https://github.com/dnovikoff/mahjong-api

api golang grpc mahjong riichi riichi-mahjong

Last synced: about 5 hours ago
JSON representation

Riichi mahjong grpc api

Awesome Lists containing this project

README

        

# mahjong-api

[![CI](https://github.com/dnovikoff/mahjong-api/workflows/CI/badge.svg?branch=master&event=push)](https://github.com/dnovikoff/mahjong-api/actions?query=workflow%3ACI)
[![Coverage Status](https://img.shields.io/codecov/c/github/dnovikoff/mahjong-api.svg)](https://codecov.io/gh/dnovikoff/mahjong-api)
[![Go Report Card](https://goreportcard.com/badge/github.com/dnovikoff/mahjong-api)](https://goreportcard.com/report/github.com/dnovikoff/mahjong-api)

## 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`