Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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: 3 months ago
JSON representation
Riichi mahjong grpc api
- Host: GitHub
- URL: https://github.com/dnovikoff/mahjong-api
- Owner: dnovikoff
- License: mit
- Created: 2019-02-27T21:36:30.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-03-02T18:20:54.000Z (almost 2 years ago)
- Last Synced: 2024-09-30T08:23:16.414Z (3 months ago)
- Topics: api, golang, grpc, mahjong, riichi, riichi-mahjong
- Language: Go
- Homepage:
- Size: 5.91 MB
- Stars: 13
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
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`