Skip to content

Commit

Permalink
Update Minesweeper.js
Browse files Browse the repository at this point in the history
  • Loading branch information
thenorthstar authored Mar 20, 2022
1 parent adcc4c7 commit a201130
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Minesweeper.js
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,7 @@ function SquaresWhoDontHaveAdjacents(){ //Shows the number of squares who have n

function CheckEnd(){ //Check game end, if all squares are checked, then player wins!
if(room.getScores() != null){
if(CheckedSquares() >= SquaresWhoHaveAdjacents()){
if(CheckedSquares() >= SquaresWhoHaveAdjacents() - SquaresWhoDontHaveAdjacents()){
ShowAllMines();
AddAllAdjacentPoints();
room.setPlayerAvatar(room.getPlayerList().filter(p => p.team == 1)[0].id);
Expand Down

0 comments on commit a201130

Please sign in to comment.