Skip to content

Commit

Permalink
make sure the condition applies to the entire expression and not just…
Browse files Browse the repository at this point in the history
… the last value
  • Loading branch information
jamis committed Jan 9, 2011
1 parent d132837 commit f7ea8a2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/algorithms/kruskal.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ class Maze.Algorithms.Kruskal extends Maze
@sets.push([])
for x in [0...@width]
@sets[y].push new Maze.Algorithms.Kruskal.Tree()
@edges.push x: x, y: y, direction: Maze.Direction.N if y > 0
@edges.push x: x, y: y, direction: Maze.Direction.W if x > 0
@edges.push(x: x, y: y, direction: Maze.Direction.N) if y > 0
@edges.push(x: x, y: y, direction: Maze.Direction.W) if x > 0

@randomizeList(@edges)

Expand Down

0 comments on commit f7ea8a2

Please sign in to comment.