Skip to content

Commit

Permalink
Update readme with more details
Browse files Browse the repository at this point in the history
  • Loading branch information
susanBuck committed Oct 21, 2019
1 parent 0f8ca9a commit ca2897a
Showing 1 changed file with 18 additions and 2 deletions.
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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());
```

0 comments on commit ca2897a

Please sign in to comment.