Fun fact: I actually wrote myself a JS script once for card-counting purposes. I wanted to know, given some reasonable assumptions about the game, how often the shoe favors the player enough that he should be increasing his bets. I was surprised to discover the answer; I don’t remember it exactly but it was something like 20-30% of the time, the player should be increasing his bet. (I was also surprised at how little time it took to iterate over a million shoes to come up with a confident average.)
Now that I think about it, maybe that should be a coding challenge.