JavaScript port of Blackjack