Skip to content

Latest commit

 

History

History
144 lines (106 loc) · 6.43 KB

README.md

File metadata and controls

144 lines (106 loc) · 6.43 KB

Travis CI

Italian-Draughts

Contributors Forks Stargazers Issues MIT License

About The Project

This repository consists of a Test Driven Development implementation of Italian Draughts using Java 17. Furthermore, continuous integration was used by means of Travis CI.

Built With

Java Gradle IntelliJ IDEA TravisCI

(back to top)

Game Setup

Italian Draughts is a 2 player game on a board of 64 squares, half are white and half are black. Each player controls 12 pieces of a specific color (black or white) and the board is placed in such a way so that the rightmost square on both sides is black. Furthermore, all the pieces are placed in black tiles only.

Shown below, is a typical setup:

Game Play

White always moves first, alternating turns. Each piece (man) can only move diagonally forward of one square. This implies, that at all times, all the pieces MUST be in a black square.

If a man reaches the opposite side of the board, it is upgraded to a king. Kings can move forward or backward (always diagonally of one square).

Furthermore, capturing is mandatory. In other words, if a man finds a piece of opposing color in his diagonal (forward of one square) with a free space in the subsequent diagonal, it must occupy the free position and capture the opposing piece. Men can only capture diagonally forward for a maximum of three pieces while kings can capture backwards as well (same rules apply). Furthermore, kings can only be captured by other kings.

The following criteria apply when capturing:

  • A player must always capture the greatest amount of pieces (to a maximum of three).
  • If a player may capture the same amount of pieces with either a man or a king, they must do so with the king.
  • If the player may capture the same amount of pieces with a king, they must choose the capture with most kings.
  • If a player may capture the same amount of kings, they must perform the capture with a king closest to its proximity.
  • If none of these rules apply, the player may choose the best capture according to their strategic needs.

Game Ending

The game ends when one of the following conditions is verified:

  • one player has captured all the opposing pieces
  • one player resigns
  • one player cannot perform any more moves.

(back to top)

Getting Started

Clone the repository to a directory. Once in the directory, run:

java -jar ./build/libs/Italian-Draughts-1.0-SNAPSHOT.jar

Prerequisites

  • Java 17

(back to top)

Contributing

This repository was created with the intention of following Agile Software Development Practices. In particular, continuous integration was a main factor for this project. We followed a Test Driven Development approach by continuously refactoring and integrating new features in small steps.

Furthermore, we set up two/three weekly meetings to align and decide future steps.

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)