From bf432c18876ef95644c6ced2e2f1a3781f1ffeb3 Mon Sep 17 00:00:00 2001 From: chyeung1 <143123817+chyeung1@users.noreply.github.com> Date: Mon, 29 Apr 2024 22:51:28 -0700 Subject: [PATCH] Update LightBoard.java --- src/main/java/LightBoard.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/LightBoard.java b/src/main/java/LightBoard.java index 2b0aa2f..d27bae5 100644 --- a/src/main/java/LightBoard.java +++ b/src/main/java/LightBoard.java @@ -15,7 +15,7 @@ public LightBoard(int numRows, int numCols) for(int i = 0; i < numRows; i++) for(int j = 0; j < numCols; j++) if(Math.random() <= 0.4) - lights[r][c] = true; + lights[i][j] = true; } /** Evaluates a light in row index row and column index col and returns a status