File tree Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Expand file tree Collapse file tree 3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -37,6 +37,3 @@ There's one thing I didn't implement according to the instructions given at any
3737https://weblog.jamisbuck.org/2010/12/29/maze-generation-eller-s-algorithm
3838
3939http://www.neocomputer.org/projects/eller.html
40-
41- TODO:
42- - bigger maze sizes mess with the perfectness of the maze (maybe because you start reassigning sets?)
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ class Row extends Component {
3232 }
3333
3434 generateNewSetId ( ) {
35- const index = this . props . index * 10 ;
35+ const index = this . props . index * Math . pow ( 10 , this . props . width . toString ( ) . length )
3636 const id = index + this . currentCell ;
3737 return id ;
3838 }
@@ -135,6 +135,7 @@ class Row extends Component {
135135 const currentCellSetId = cells [ this . currentCell ] . props . setID ;
136136
137137 if (
138+ ! this . props . lastRow &&
138139 this . willJoin ( ) &&
139140 this . currentCell < this . props . width - 1 &&
140141 currentCellSetId !== cells [ this . currentCell + 1 ] . props . setID
@@ -149,7 +150,7 @@ class Row extends Component {
149150 if ( cells [ this . currentCell + 1 ] &&
150151 cells [ this . currentCell + 1 ] . props . setID !==
151152 cells [ this . currentCell ] . props . setID ) {
152- cells = this . joinCellsToSet ( cells , currentCellSetId , cells [ this . currentCell ] . props . setID ) ;
153+ cells = this . joinCellsToSet ( cells , currentCellSetId , cells [ this . currentCell + 1 ] . props . setID ) ;
153154 }
154155 }
155156
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ h1, p {
1515 justify-content : center ;
1616 align-items : center ;
1717 border : 1px solid white ;
18- font-size : 16 px ;
18+ font-size : 12 px ;
1919}
2020
2121.active {
You can’t perform that action at this time.
0 commit comments