Skip to content

Commit

Permalink
Black ball foul bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
I authored and I committed Mar 1, 2018
1 parent 1d6c49c commit e432a47
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions WamPoolPolicy.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,9 @@ WamPoolPolicy.prototype.checkColisionValidity = function(ball1,ball2){

let currentPlayerColor = this.players[this.turn].color;

if(this.players[this.turn].matchScore === 7 &&
(ball1.color === Color.black || ball2.color === Color.black)){
if(this.players[this.turn].matchScore.value == 7 &&
(ball1.color == Color.black || ball2.color == Color.black)){
this.firstCollision = false;
return;
}

Expand Down

0 comments on commit e432a47

Please sign in to comment.