From ca2897ab34bfeb91d3e76bb8783d4659ede5c9ec Mon Sep 17 00:00:00 2001 From: Susan Buck Date: Mon, 21 Oct 2019 19:42:01 -0400 Subject: [PATCH] Update readme with more details --- README.md | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ef12be1..b890e44 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,28 @@ # Rock Paper Scissors -## Example +An example package used to demonstrate dependencies in [DGMD E-2 Web Programming for Beginners with PHP](https://hesweb.dev/e2). + + + +## Installation +```php +composer require susanbuck/rock-paper-scissors +``` + + +## Usage ```php +require __DIR__.'/vendor/autoload.php'; + +use RPS\Game; + $game = new Game(); +# Eack invocation of the `play` method will play and track a new round of player (given move) vs. computer $game->play('rock'); $game->play('paper'); $game->play('scissors'); -var_dump($game->getResults()); +# An array of the results for each round (player move, computer move, whether player won) can be accessed from the `getResults` method +var_dump($game->getResults()); ``` \ No newline at end of file