Browse Source

added an extra row and column to guarantee surface coverage

Brandon Wong 7 years ago
parent
commit
be229931dc
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Main.elm

+ 2 - 2
Main.elm

@@ -163,8 +163,8 @@ update msg model =
             ( { model | board = board }, Cmd.none )
         InitializeBoard size ->
             let
-                numRows = size.height // cellSize
-                numCols = size.width // cellSize
+                numRows = size.height // cellSize + 1
+                numCols = size.width // cellSize + 1
             in
                 ( model, Random.generate SetBoard (generateRandom numRows numCols) )
         _ ->