croupier javascript class