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

https://github.com/riatabduramani/gameofthree

Implementation of a game with two independent agents – the "players" – communicating with each other using an interface.
https://github.com/riatabduramani/gameofthree

challenge-project http php

Last synced: 2 months ago
JSON representation

Implementation of a game with two independent agents – the "players" – communicating with each other using an interface.

Awesome Lists containing this project

README

        

### GameOfThree - Coding Challenge
The goal is to implement a game with two independent agents – the “players” – communicating with each other using an interface. When a player starts, a random whole number is generated and sent to the other player, which indicates the start of the game. The receiving player must now add one of { -1, 0, 1 } to get a number that is divisible by 3 and then divide it. The resulting number is then sent back to the original sender. The same rules apply until one of the players reaches the number 1 after division, which ends the game.

### How to play?
Get the files and add to your php environment, open two terminals and run the file:

 $ php play.php 

The game instructions will be shown when you will call the above mentioned file.

####Cheers!