Skip to content

tphummel/node-craps

Repository files navigation

node-craps

Github Workflow Status

🎲🎲 craps simulator πŸ’΅

simulate a hand

➜  node hands.js 1

Simulating 1 Craps Hand(s)

Dice Roll Distribution
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ (index) β”‚ Values β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚    2    β”‚   0    β”‚
β”‚    3    β”‚   0    β”‚
β”‚    4    β”‚   0    β”‚
β”‚    5    β”‚   2    β”‚
β”‚    6    β”‚   2    β”‚
β”‚    7    β”‚   1    β”‚
β”‚    8    β”‚   3    β”‚
β”‚    9    β”‚   3    β”‚
β”‚   10    β”‚   1    β”‚
β”‚   11    β”‚   2    β”‚
β”‚   12    β”‚   0    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Session Summary
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚    (index)     β”‚ Values β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚   handCount    β”‚   1    β”‚
β”‚   rollCount    β”‚   14   β”‚
β”‚   pointsSet    β”‚   3    β”‚
β”‚   pointsWon    β”‚   2    β”‚
β”‚  comeOutWins   β”‚   0    β”‚
β”‚ comeOutLosses  β”‚   0    β”‚
β”‚ netComeOutWins β”‚   0    β”‚
β”‚    neutrals    β”‚   8    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Hands

Hand: 1
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”
β”‚ (index) β”‚ die1 β”‚ die2 β”‚ diceSum β”‚   result    β”‚ isComeOut β”‚ point β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€
β”‚    0    β”‚  3   β”‚  6   β”‚    9    β”‚ 'point set' β”‚   false   β”‚   9   β”‚
β”‚    1    β”‚  4   β”‚  5   β”‚    9    β”‚ 'point win' β”‚   true    β”‚       β”‚
β”‚    2    β”‚  3   β”‚  5   β”‚    8    β”‚ 'point set' β”‚   false   β”‚   8   β”‚
β”‚    3    β”‚  3   β”‚  6   β”‚    9    β”‚  'neutral'  β”‚   false   β”‚   8   β”‚
β”‚    4    β”‚  5   β”‚  5   β”‚   10    β”‚  'neutral'  β”‚   false   β”‚   8   β”‚
β”‚    5    β”‚  3   β”‚  5   β”‚    8    β”‚ 'point win' β”‚   true    β”‚       β”‚
β”‚    6    β”‚  2   β”‚  6   β”‚    8    β”‚ 'point set' β”‚   false   β”‚   8   β”‚
β”‚    7    β”‚  2   β”‚  3   β”‚    5    β”‚  'neutral'  β”‚   false   β”‚   8   β”‚
β”‚    8    β”‚  1   β”‚  4   β”‚    5    β”‚  'neutral'  β”‚   false   β”‚   8   β”‚
β”‚    9    β”‚  5   β”‚  6   β”‚   11    β”‚  'neutral'  β”‚   false   β”‚   8   β”‚
β”‚   10    β”‚  2   β”‚  4   β”‚    6    β”‚  'neutral'  β”‚   false   β”‚   8   β”‚
β”‚   11    β”‚  1   β”‚  5   β”‚    6    β”‚  'neutral'  β”‚   false   β”‚   8   β”‚
β”‚   12    β”‚  5   β”‚  6   β”‚   11    β”‚  'neutral'  β”‚   false   β”‚   8   β”‚
β”‚   13    β”‚  3   β”‚  4   β”‚    7    β”‚ 'seven out' β”‚   true    β”‚       β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”˜

what? why?

I like to play craps sometimes. I have a handful of strategies I like to play. It is time consuming to play in an app. I'd like to play 5, 50, 500 hands very fast using various strategies. Which strategies are best is well understood, the variability comes in with how aggressive your strategies are and the level of risk you assume at any given moment. And of course the dice outcomes and their deviation from long term probabilities and how they interact with the strategies you employ is the fun part. This simulator lets me scratch my craps itch very quickly.

dev

git clone git@github.com:tphummel/node-craps.git
cd node-craps
npm i
npm t

Releases

No releases published