https://github.com/ormanli/kalah
Kalah game implementation using actors
https://github.com/ormanli/kalah
actor-model java java11 micronaut quasar rulebook
Last synced: 11 months ago
JSON representation
Kalah game implementation using actors
- Host: GitHub
- URL: https://github.com/ormanli/kalah
- Owner: ormanli
- License: apache-2.0
- Created: 2019-06-04T16:17:39.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2021-06-13T11:59:38.000Z (almost 5 years ago)
- Last Synced: 2025-03-30T08:42:17.917Z (about 1 year ago)
- Topics: actor-model, java, java11, micronaut, quasar, rulebook
- Language: Java
- Homepage:
- Size: 26.4 KB
- Stars: 1
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# kalah
Example [kalah](https://en.wikipedia.org/wiki/Kalah) game implementation using Micronaut, RuleBook and Quasar Actors.
Info
====
* When the application receives a request to create a new game, it spawns a new `GameActor`. After that for each game-related action is routed to corresponding `GameActor`.
* There is no persistence and error handling.
* RuleBook used to implement rules as the chain of responsibility under `com.serdarormanli.kalah.rules` package.
* Default number of pits per player and number of stones per pit is configurable. They can be overridden in `application.yaml`.
* Rest api served at `localhost:8080/kalah` by default.
* Rest api has 3 resources.
* `/kalah POST` creates new game returns board. Takes `numberOfPitsPerPlayer` and `numberOfStonesPerPit` as optional query parameters.
* `/kalah/{gameId} GET` returns latest snapshot of game.
* `/kalah/{gameId}/indexOfPit/{indexOfPit} POST` picks stones and distributes. Returns latest snapshot of the game.
* There is a basic frontend served at `localhost:8080` by default.
Used Technologies
====
* Java 11
* Micronaut
* Quasar
* RuleBook
⚠️ This application requires Java 11 for build and run. Newer Java versions are not supported. ⚠️