ソースを参照

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 )
             ( { model | board = board }, Cmd.none )
         InitializeBoard size ->
         InitializeBoard size ->
             let
             let
-                numRows = size.height // cellSize
-                numCols = size.width // cellSize
+                numRows = size.height // cellSize + 1
+                numCols = size.width // cellSize + 1
             in
             in
                 ( model, Random.generate SetBoard (generateRandom numRows numCols) )
                 ( model, Random.generate SetBoard (generateRandom numRows numCols) )
         _ ->
         _ ->