From e11ce5de60afdada0bee0b9aa940866758cc4e68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Costa?= Date: Sat, 19 Jan 2013 23:35:19 -0300 Subject: [PATCH] Fixed readme file --- README.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 0259487..4d3edb5 100644 --- a/README.md +++ b/README.md @@ -9,6 +9,9 @@ npm install texas ``` ## Using + +### Evaluator + The following example generates a random hand and evaluates it: ```javascript var _ = require('underscore'); @@ -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'); @@ -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