@@ -71,8 +71,8 @@ class GridLayout extends Component {
71
71
// change(1);
72
72
73
73
// updateStyle(){
74
- // for(let row=0;row<19 ;row++){
75
- // for(let col=0;col<60 ;col++){
74
+ // for(let row=0;row<18 ;row++){
75
+ // for(let col=0;col<53 ;col++){
76
76
// document.getElementById(`node-${row}-${col}`).className = 'unvisited';
77
77
// if((row===this.state.start[0] && col===this.state.start[1]))
78
78
// {
@@ -89,9 +89,9 @@ class GridLayout extends Component {
89
89
90
90
gridRender ( ) {
91
91
const b = [ ] ;
92
- for ( let row = 0 ; row < 19 ; row ++ ) {
92
+ for ( let row = 0 ; row < 18 ; row ++ ) {
93
93
const currRow = [ ] ;
94
- for ( let col = 0 ; col < 60 ; col ++ ) {
94
+ for ( let col = 0 ; col < 53 ; col ++ ) {
95
95
96
96
const val = {
97
97
row,
@@ -120,9 +120,9 @@ class GridLayout extends Component {
120
120
121
121
grdRender ( r , c ) {
122
122
const b = [ ] ;
123
- for ( let row = 0 ; row < 19 ; row ++ ) {
123
+ for ( let row = 0 ; row < 18 ; row ++ ) {
124
124
const currRow = [ ] ;
125
- for ( let col = 0 ; col < 60 ; col ++ ) {
125
+ for ( let col = 0 ; col < 53 ; col ++ ) {
126
126
127
127
const val = {
128
128
row,
@@ -154,9 +154,9 @@ class GridLayout extends Component {
154
154
155
155
gridRerender ( ) {
156
156
const b = [ ] ;
157
- for ( let row = 0 ; row < 19 ; row ++ ) {
157
+ for ( let row = 0 ; row < 18 ; row ++ ) {
158
158
const currRow = [ ] ;
159
- for ( let col = 0 ; col < 60 ; col ++ ) {
159
+ for ( let col = 0 ; col < 53 ; col ++ ) {
160
160
161
161
const val = {
162
162
row,
@@ -207,9 +207,9 @@ class GridLayout extends Component {
207
207
208
208
generateNewGridWithPreviousWalls ( ) {
209
209
const b = [ ] ;
210
- for ( let row = 0 ; row < 19 ; row ++ ) {
210
+ for ( let row = 0 ; row < 18 ; row ++ ) {
211
211
const currRow = [ ] ;
212
- for ( let col = 0 ; col < 60 ; col ++ ) {
212
+ for ( let col = 0 ; col < 53 ; col ++ ) {
213
213
const boxes = this . state . boxes ;
214
214
const node = boxes [ row ] [ col ] ;
215
215
const val = {
@@ -240,9 +240,9 @@ class GridLayout extends Component {
240
240
randomGridGeneration ( ) {
241
241
const b = [ ]
242
242
if ( ! this . state . running ) {
243
- for ( let row = 0 ; row < 19 ; row ++ ) {
243
+ for ( let row = 0 ; row < 18 ; row ++ ) {
244
244
const c = [ ] ;
245
- for ( let col = 0 ; col < 60 ; col ++ ) {
245
+ for ( let col = 0 ; col < 53 ; col ++ ) {
246
246
const ran = Math . floor ( Math . random ( ) * 5 + 1 ) ;
247
247
const box = this . state . boxes ;
248
248
@@ -279,9 +279,9 @@ class GridLayout extends Component {
279
279
randomWeightGeneration ( ) {
280
280
const b = [ ]
281
281
if ( ! this . state . running ) {
282
- for ( let row = 0 ; row < 19 ; row ++ ) {
282
+ for ( let row = 0 ; row < 18 ; row ++ ) {
283
283
const c = [ ] ;
284
- for ( let col = 0 ; col < 60 ; col ++ ) {
284
+ for ( let col = 0 ; col < 53 ; col ++ ) {
285
285
const ran = Math . floor ( Math . random ( ) * 5 + 1 ) ;
286
286
const box = this . state . boxes ;
287
287
@@ -629,7 +629,7 @@ class GridLayout extends Component {
629
629
document . getElementById ( `node-${ row - 1 } -${ col } ` ) . className = 'gridblock unvisited' ;
630
630
if ( col != 0 )
631
631
document . getElementById ( `node-${ row } -${ col - 1 } ` ) . className = 'gridblock unvisited' ;
632
- if ( col != 59 )
632
+ if ( col != 53 )
633
633
document . getElementById ( `node-${ row } -${ col + 1 } ` ) . className = 'gridblock unvisited' ;
634
634
if ( row != 18 )
635
635
document . getElementById ( `node-${ row + 1 } -${ col } ` ) . className = 'gridblock unvisited' ;
0 commit comments