Blackjack functions updated to translate functions from PHP