Skip to content

Commit

Permalink
Fixed readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
André Costa committed Jan 20, 2013
1 parent 7370321 commit e11ce5d
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions README.md
Expand Up @@ -9,6 +9,9 @@ npm install texas
```

## Using

### Evaluator

The following example generates a random hand and evaluates it:
```javascript
var _ = require('underscore');
Expand All @@ -19,7 +22,15 @@ console.log(_.map(hand, texas.abbr));
console.log(texas.evaluate(hand));
```

The following example calculates the odds of a 2-player game:
Which will output something like:
```
[ '5h', '3s', '4d', '7s', '5d', 'Jd', '6d' ]
{ name: 'Straight', value: 20483 }
```

### Odds

The following example calculates the odds of a 2-player game after the flop:
```javascript
var texas = require('texas');

Expand All @@ -29,8 +40,8 @@ console.log(odds);

Which will output something like:
```
[ '5h', '3s', '4d', '7s', '5d', 'Jd', '6d' ]
{ name: 'Straight', value: 20483 }
[ { win: 0.2608695652173913, split: 0 },
{ win: 0.7391304347826086, split: 0 } ]
```

## Formats
Expand Down

0 comments on commit e11ce5d

Please sign in to comment.