Skip to content

Commit

Permalink
larger maze, more seeds
Browse files Browse the repository at this point in the history
  • Loading branch information
BrianHicks committed Feb 8, 2022
1 parent 5226a3d commit 22f432a
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/Main.elm
Expand Up @@ -7,26 +7,23 @@ import Random
import Svg.Styled as Svg


threeByThree : Maze { coords : ( Int, Int ) } { wall : Bool }
threeByThree =
tenByTen : Maze { coords : ( Int, Int ) } { wall : Bool }
tenByTen =
Maze.squares
(\coords -> { coords = coords })
{ wall = True }
{ width = 3, height = 3 }


seed : Random.Seed
seed =
Random.initialSeed 0
{ width = 10, height = 10 }


main : RootHtml.Html msg
main =
Html.main_ []
[ Html.h1 [] [ Html.text "Mazes!" ]
, Html.h2 [] [ Html.text "Ungenerated" ]
, Maze.view threeByThree
, Maze.view tenByTen
, Html.h2 [] [ Html.text "Generated" ]
, Maze.view (Maze.generate 1 9 threeByThree seed)
, Maze.view (Maze.generate 1 9 tenByTen (Random.initialSeed 0))
, Maze.view (Maze.generate 1 9 tenByTen (Random.initialSeed 1))
, Maze.view (Maze.generate 1 9 tenByTen (Random.initialSeed 2))
]
|> Html.toUnstyled

0 comments on commit 22f432a

Please sign in to comment.