Skip to content

Commit

Permalink
Update LightBoard.java
Browse files Browse the repository at this point in the history
  • Loading branch information
chyeung1 authored Apr 30, 2024
1 parent 9c2e3fb commit bfca9f4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/LightBoard.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ public boolean evaluateLight(int row, int col)
for(int i = 0; i < col; i++)
if(lights[row][i]) count++;
if(lights[row][col]){
return !count%2;
return (count % 2 != 0);
} else if(!lights[row][col])
return count%3;
return count % 3 == 0;
return lights[row][col];


Expand Down

0 comments on commit bfca9f4

Please sign in to comment.