Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Computer getting blackjack was not recorded properly. Also computer only gets dealt one card at the beginning of the turn. // function compare(user_score, computer_score) { // if (user_score > 21 && computer_score > 21) { // return "You went over. You lose π€"; // } // if (user_score == computer_score) { // return "Draw π"; // } else if (computer_score == 0) { // return "Lose, opponent has Blackjack π±"; // } else if (user_score == 0) { // return "Win with a Blackjack π"; // } else if (user_score > 21) { // return "You went over. You lose π"; // } else if (computer_score > 21) { // return "Opponent went over. You win π"; // } else if (user_score > computer_score) { // return "You win π"; // } else { // return "You lose π€"; // } // }
- Loading branch information