testing javascript and php on a simple black jack game