Giter Club home page Giter Club logo

goose-game-kata's Introduction

The Goose Game Kata

Goose game is a game where two or more players move pieces around a track by rolling a die. The aim of the game is to reach square number sixty-three before any of the other players and avoid obstacles. (wikipedia)

This kata has been invented by Matteo Vaccari, you can find the original slides here.

General requirements

Git

Java 1.8

Maven 3.6.0

Install

git clone https://github.com/bayois/goose-game-kata.git

cd goose-game-kata

mvn clean package

java -jar target/goose-game-kata-0.1.0.jar

Features

1. Add players

As a player, I want to add me to the game so that I can play.

Scenarios:

  1. Add Player

    If there is no participant
    the user writes: "add player Pippo"
    the system responds: "players: Pippo"
    the user writes: "add player Pluto"
    the system responds: "players: Pippo, Pluto"
  2. Duplicated Player

    If there is already a participant "Pippo"
    the user writes: "add player Pippo"
    the system responds: "Pippo: already existing player"

2. Move a player

As a player, I want to move the marker on the board to make the game progress

Scenarios:

  1. Start
    If there are two participants "Pippo" and "Pluto" on space "Start"
    the user writes: "move Pippo 4, 2"
    the system responds: "Pippo rolls 4, 2. Pippo moves from Start to 6"
    the user writes: "move Pluto 2, 2"
    the system responds: "Pluto rolls 2, 2. Pluto moves from Start to 4"
    the user writes: "move Pippo 2, 3"
    the system responds: "Pippo rolls 2, 3. Pippo moves from 6 to 11"

3. Win

As a player, I win the game if I land on space "63"

Scenarios:

  1. Victory

    If there is one participant "Pippo" on space "60"
    the user writes: "move Pippo 1, 2"
    the system responds: "Pippo rolls 1, 2. Pippo moves from 60 to 63. Pippo Wins!!"
  2. Winning with the exact dice shooting

    If there is one participant "Pippo" on space "60"
    the user writes: "move Pippo 3, 2"
    the system responds: "Pippo rolls 3, 2. Pippo moves from 60 to 63. Pippo bounces! Pippo returns to 61"

4. The game throws the dice

As a player, I want the game throws the dice for me to save effort

Scenarios:

  1. Dice roll
    If there is one participant "Pippo" on space "4"
    assuming that the dice get 1 and 2
    when the user writes: "move Pippo"
    the system responds: "Pippo rolls 1, 2. Pippo moves from 4 to 7"

5. Space "6" is "The Bridge"

As a player, when I get to the space "The Bridge", I jump to the space "12"

Scenarios:

  1. Get to "The Bridge"
    If there is one participant "Pippo" on space "4"
    assuming that the dice get 1 and 1
    when the user writes: "move Pippo"
    the system responds: "Pippo rolls 1, 1. Pippo moves from 4 to The Bridge. Pippo jumps to 12"

6. If you land on "The Goose", move again

As a player, when I get to a space with a picture of "The Goose", I move forward again by the sum of the two dice rolled before

The spaces 5, 9, 14, 18, 23, 27 have a picture of "The Goose"

Scenarios:

  1. Single Jump

    If there is one participant "Pippo" on space "3"
    assuming that the dice get 1 and 1
    when the user writes: "move Pippo"
    the system responds: "Pippo rolls 1, 1. Pippo moves from 3 to 5, The Goose. Pippo moves again and goes to 7"
  2. Multiple Jump

    If there is one participant "Pippo" on space "10"
    assuming that the dice get 2 and 2
    when the user writes: "move Pippo"
    the system responds: "Pippo rolls 2, 2. Pippo moves from 10 to 14, The Goose. Pippo moves again and goes to 18, The Goose. Pippo moves again and goes to 22"

7. Prank (Optional Step)

As a player, when I land on a space occupied by another player, I send him to my previous position so that the game can be more entertaining.

Scenarios:

  1. Prank
    If there are two participants "Pippo" and "Pluto" respectively on spaces "15" and "17"
    assuming that the dice get 1 and 1
    when the user writes: "move Pippo"
    the system responds: "Pippo rolls 1, 1. Pippo moves from 15 to 17. On 17 there is Pluto, who returns to 15"

goose-game-kata's People

Contributors

a-fina avatar xpepper 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.