Skip to content

Commit

Permalink
feat(randomised_kruskal): tweak number of modified wall
Browse files Browse the repository at this point in the history
  • Loading branch information
anhgelus committed Jun 3, 2023
1 parent 3004588 commit fac5dc4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Generators/randomised_kruskal.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ func NewRandomisedKruskal(b *Maze) error {
println("Starting the difficulty generation...")
if m.Difficulty > 0 {
size := len(m.Walls)
for n := 0; n < int(math.Floor(float64(size/4)*(float64(m.Difficulty)*0.1))); n++ {
for n := 0; n < int(math.Floor(float64(size/4)*(float64(m.Difficulty)*0.05))); n++ {
id := uint(utils.RandMax(uint(size - 1)))
i, j := m.GenIJFromIDOfWall(id)
if i == 0 || i == m.Width-1 || j == m.Height-1 {
Expand Down

0 comments on commit fac5dc4

Please sign in to comment.