Skip to content

Commit

Permalink
rename function better name
Browse files Browse the repository at this point in the history
  • Loading branch information
danielcoam committed Jun 10, 2016
1 parent af673dc commit 11aee29
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ BlackJack.controller('ngGame', function($scope, Card, Deck, Player, noSurrender,
$scope.clickedCard = NaN;
$("#dealerChooseCard").closeModal();
$("#playerChooseCard").closeModal();
checkPlayerHandStatusAfterATake();
checkPlayerHandStatusAfterHit();
//if the double button clicked - we need to start deal cards to the dealer only after the card was flipped
//that's way this if is here ↓↓
if($scope.doubleClicked)
Expand Down Expand Up @@ -283,7 +283,7 @@ BlackJack.controller('ngGame', function($scope, Card, Deck, Player, noSurrender,
}
}

function checkPlayerHandStatusAfterATake()
function checkPlayerHandStatusAfterHit()
{
var playerSum = $scope.player.hands[0].sum();
if(playerSum>21)
Expand Down Expand Up @@ -312,7 +312,7 @@ BlackJack.controller('ngGame', function($scope, Card, Deck, Player, noSurrender,
else {
$scope.player.hands[0].take($scope.deck.getFakeCard(), true);
}
checkPlayerHandStatusAfterATake();
checkPlayerHandStatusAfterHit();
}

function checkWinner() {
Expand Down

0 comments on commit 11aee29

Please sign in to comment.