Giter Site home page Giter Site logo

kalah's Introduction

Kalah Game

This a simple POC a game in rest format.
This is a game of 6-stone Kalah. Wikipedia: https://en.wikipedia.org/wiki/Kalah.

API documentation

Normally a good practise would be to first crate the api documentation. For example using an OpenAPI

Create new game

Sequence diagram

Make a move

Sequence diagram

Play the game

There were no UI requirements. For an issue play Postman collections can be used. Default port is set to 8081. (http://localhost:8081) Load collection Kalah.postman_collection Then using one of a plugin to generate respective API interface for implementation.

My preference would be a BOAT plugin as it's really simple a cover mostly all needed cases out of the box

About the game

The player who begins picks up all the stones in any of their own pits, and sows the stones on to the right, one in each of the following pits, including his own Kalah. No stones are put in the opponent's' Kalah. If the players last stone lands in his own Kalah, he gets another turn. This can be repeated any number of times before it's the other player's turn.

When the last stone lands in an own empty pit, the player captures this stone and all stones in the opposite pit (the other players' pit) and puts them in his own Kalah.

The game is over as soon as one of the sides run out of stones. The player who still has stones in his/her pits keeps them and puts them in his/hers Kalah. The winner of the game is the player who has the most stones in his Kalah

Install & Running

Prerequisites

Pull from git

$ git clone https://github.com/Aboruhen/kalah.git
$ cd kalah

Build & run

  • How to manage different java versions
$ sdk list java
$ sdk install java 17.0.1-oracle
$ sdk use java  17.0.1-oracle
  • Run test
$ mvn test
  • Run the web server on dev mode
$ mvn spring-boot:run

Built With

kalah's People

Contributors

aboruhen avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.