Don't randomize weight whilst generating a maze
This commit is contained in:
		
							parent
							
								
									7e44d0fb3f
								
							
						
					
					
						commit
						bb7b48e6e6
					
				
					 1 changed files with 2 additions and 2 deletions
				
			
		|  | @ -40,8 +40,8 @@ public class MazeGenerator<V> { | |||
|                 stack.push(current); | ||||
|                 var neighbour = unvisited.get(random.nextInt(unvisited.size())); | ||||
| 
 | ||||
|                 graph.connectNodes(current, random.nextDouble(), neighbour); | ||||
|                 graph.connectNodes(neighbour, random.nextDouble(), current); | ||||
|                 graph.connectNodes(current, 1.0, neighbour); | ||||
|                 graph.connectNodes(neighbour, 1.0, current); | ||||
| 
 | ||||
|                 visited.add(neighbour); | ||||
|                 stack.push(neighbour); | ||||
|  |  | |||
		Reference in a new issue