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

https://github.com/marcpinet/takenoko

♟️ Board game made as part of a school project.
https://github.com/marcpinet/takenoko

board-game bot continuous-integration devops java maven takenoko

Last synced: 12 months ago
JSON representation

♟️ Board game made as part of a school project.

Awesome Lists containing this project

README

          

[![Java CI with Maven](https://github.com/marcpinet/takenoko/actions/workflows/autotest.yml/badge.svg)](https://github.com/marcpinet/takenoko/actions)





Logo

Takenoko

Java implementation of the board game Takenoko where players try to grow and harvest bamboo while managing a garden and a panda.






View Demo
·
Report Bug
·
Request Feature


NOTE: As we can't fully import issues, projects and pull requests from one repo to another, the projet will be published as is, including some changes we might think of in the future.

## Game Rules

Takenoko is a board game for 2-4 players, set in ancient China during the Han Dynasty. The objective of the game is to
earn the most points by cultivating the garden and completing objectives.

Here are the basic rules for playing Takenoko:

- Set up the game board, which consists a pond tile. Place the panda and gardener figurines on the pond.
- On his turn, a player must choose two different actions from among :
- Draw three tiles and choose one to place according to the placement rules
- Take an irrigation stick from the reserve and add it to your inventory
- Move the gardener and grow the adjacent bamboos according to the rules
- Move the panda and get a bamboo on the arrival tile
- Draw an objective card of a certain type. (max 5 in your hand)
- If a player unveils one of his achieved objective cards, he gets the points indicated on the card.
- The game ends when a player has revealed 7 objective cards, the player with the most points wins.

Detailed rules

## Current features

*Updated on February 09, 2023*

* 3 types of bots (random, strategy, wrecker)
* Simulations of n games in a row
* Stats summary output in a `.csv` file
* Actions system
* Undo/Redo design
* Fully automated repo to prevent breaking changes and minimize merge conflicts
* Extensible, well-documented

### Built With

* [Java](https://www.java.com/fr/)
* [Maven](https://maven.apache.org/)
* [JUnit](https://junit.org/junit5/)
* [OpenCSV](https://mvnrepository.com/artifact/com.opencsv/opencsv/)

## Getting Started

### Prerequisites

* Maven
* Java 17 with preview enabled (--enable-preview VM option)
* Git

### Installation

1. Clone the repo

```sh
git clone https://github.com/marcpinet/takenoko.git
```
2. Install the required dependencies

```sh
mvn clean install
```
3. Build and run the project

```sh
mvn exec:java
```

### Tests and arguments

Run tests

```sh
mvn test
```

Generate reports of 300 games (can be tweaked in the [Main](src/main/java/takenoko/main/Main.java) file)

```sh
mvn -e exec:java '-Dexec.args="--csv"'
```

Generate simulation of 2000 games

```sh
mvn -e exec:java '-Dexec.args="--2thousands"'
```

Demo of a single game

```sh
mvn -e exec:java '-Dexec.args="--demo"'
```

## Usage

This version of takenoko is fully automated: bots of different levels play against each other, so there is no specific
action to perform during the game, logs informing about each action will be logged as well as the detailed result of the
game.

## License

Distributed under the Mozilla Public License Version 2.0. See `LICENSE` for more information.