Skip to content

Latest commit

 

History

History
24 lines (15 loc) · 568 Bytes

README.md

File metadata and controls

24 lines (15 loc) · 568 Bytes

The Stateful ElePHPant

This project explains states using a game (with normal if statements) and a PHP implementation using the state pattern.

Game

You can see the game here: https://rskuipers.github.com/stateful-elephpant

Usage

If you want to run the game locally, start a php service in the root of this project.

$ php -S 0:8080

And view the game here: http://localhost:8080/index.html

You can also execute the PHP equivalant.

$ php index.php