Skip to content
This repository has been archived by the owner on Feb 1, 2025. It is now read-only.

Latest commit

 

History

History
162 lines (120 loc) · 5.52 KB

README.md

File metadata and controls

162 lines (120 loc) · 5.52 KB

Java CI with Maven


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

Getting Started

Prerequisites

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

Installation

  1. Clone the repo

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

    mvn clean install
  3. Build and run the project

    mvn exec:java

Tests and arguments

Run tests

mvn test

Generate reports of 300 games (can be tweaked in the Main file)

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

Generate simulation of 2000 games

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

Demo of a single game

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.