Skip to content

Commit 6d176cf

Browse files
committed
Oops
1 parent 71e123d commit 6d176cf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

js/EightBallGame.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ EightBallGame.prototype.coloredBallEnteredHole = function (name) {
6262
if (eightballgame.sides.player1 == '?' || eightballgame.sides.player2 == '?') {
6363
eightballgame.sides[eightballgame.turn] = ballno < 8 ? 'solid' : 'striped';
6464
eightballgame.sides[eightballgame.turn == 'player1' ? 'player2' : 'player1'] = ballno > 8 ? 'solid' : 'striped';
65-
pocketingOccurred = true;
65+
eightballgame.pocketingOccurred = true;
6666
} else {
6767
if ((eightballgame.sides[eightballgame.turn] == 'solid' && ballno < 8) || (eightballgame.sides[eightballgame.turn] == 'striped' && ballno > 8)) {
6868
// another turn
69-
pocketingOccurred = true;
69+
eightballgame.pocketingOccurred = true;
7070
} else {
71-
pocketingOccurred = false;
71+
eightballgame.pocketingOccurred = false;
7272
gui.log(eightballgame.turn + " pocketed opponent's ball!");
7373
}
7474
}

0 commit comments

Comments
 (0)