josenava / bingo-kata

Bingo game kata in PHP7.2

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

bingo-kata

https://agilekatas.co.uk/katas/Bingo-Kata

Bingo game kata in PHP7.2

###Installation guide: If you have PHP7.2 just run composer install and php main.php us 1 75 5 5 200.

Parameters explained:

  • us -> Bingo mode, right now is the only one implemented.
  • 1 -> Minimum range for the card.
  • 75 -> Maximum range for the card.
  • 5 -> rows for the card.
  • 5 -> columns for the card.
  • 200 -> number of players.

Right now all those parameters are passed to main.php script but ideally they should be read from a config file which will contain the rules of the US Bingo, also some more in depth validation is missing in the config ie: Throwing proper errors when strings are passed instead of int.

In case you want to use docker, there are a couple of commands in the Makefile:

  • make start-docker
  • make composer-install
  • make run-game-us
  • make run-tests

About

Bingo game kata in PHP7.2

License:MIT License


Languages

Language:PHP 94.9%Language:Shell 2.2%Language:Dockerfile 1.5%Language:Makefile 1.4%