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.
- Host: GitHub
- URL: https://github.com/riatabduramani/gameofthree
- Owner: riatabduramani
- Created: 2018-12-02T22:52:47.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-12-03T11:18:11.000Z (over 6 years ago)
- Last Synced: 2025-02-24T12:45:22.168Z (2 months ago)
- Topics: challenge-project, http, php
- Language: PHP
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
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.phpThe game instructions will be shown when you will call the above mentioned file.
####Cheers!