Переглянути джерело

added an extra row and column to guarantee surface coverage

Brandon Wong 7 роки тому
батько
коміт
be229931dc
1 змінених файлів з 2 додано та 2 видалено
  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) )
         _ ->