Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ebaa872

Browse files
Increased the Grid Size
1 parent 0e6bf88 commit ebaa872

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

‎src/Components/GridLayoutComponent.js

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class GridLayout extends Component {
2222
end: [13, 45],
2323
unchanged: true,
2424
speed: { slow: 1000, normal: 100, fast: 10 },
25-
curSpeed: 10,
25+
curSpeed: 10
2626
}
2727
}
2828

@@ -67,9 +67,9 @@ class GridLayout extends Component {
6767

6868
gridRender() {
6969
const b = [];
70-
for (let row = 0; row < 18; row++) {
70+
for (let row = 0; row < 25; row++) {
7171
const currRow = [];
72-
for (let col = 0; col < 53; col++) {
72+
for (let col = 0; col < 55; col++) {
7373

7474
const val = {
7575
row,
@@ -98,7 +98,7 @@ class GridLayout extends Component {
9898

9999
grdRender(r, c) {
100100
const b = [];
101-
for (let row = 0; row < 18; row++) {
101+
for (let row = 0; row < 20; row++) {
102102
const currRow = [];
103103
for (let col = 0; col < 53; col++) {
104104

@@ -132,7 +132,7 @@ class GridLayout extends Component {
132132

133133
gridRerender() {
134134
const b = [];
135-
for (let row = 0; row < 18; row++) {
135+
for (let row = 0; row < 20; row++) {
136136
const currRow = [];
137137
for (let col = 0; col < 53; col++) {
138138

@@ -185,15 +185,14 @@ class GridLayout extends Component {
185185
if (!node.iswall && !node.strt && !node.end) {
186186
document.getElementById(`node-${row}-${col}`).className = '';
187187
}
188-
// document.getElementById('display').innerHTML("This Algorithm doesn't support the weights");
189188
}
190189
}
191190
}
192191
}
193192

194193
generateNewGridWithPreviousWalls() {
195194
const b = [];
196-
for (let row = 0; row < 18; row++) {
195+
for (let row = 0; row < 20; row++) {
197196
const currRow = [];
198197
for (let col = 0; col < 53; col++) {
199198
const boxes = this.state.boxes;
@@ -226,7 +225,7 @@ class GridLayout extends Component {
226225
randomGridGeneration() {
227226
const b = []
228227
if (!this.state.running) {
229-
for (let row = 0; row < 18; row++) {
228+
for (let row = 0; row < 20; row++) {
230229
const c = [];
231230
for (let col = 0; col < 53; col++) {
232231
const ran = Math.floor(Math.random() * 5 + 1);
@@ -265,7 +264,7 @@ class GridLayout extends Component {
265264
randomWeightGeneration() {
266265
const b = []
267266
if (!this.state.running) {
268-
for (let row = 0; row < 18; row++) {
267+
for (let row = 0; row < 20; row++) {
269268
const c = [];
270269
for (let col = 0; col < 53; col++) {
271270
const ran = Math.floor(Math.random() * 5 + 1);
@@ -645,7 +644,7 @@ class GridLayout extends Component {
645644
document.getElementById(`node-${row}-${col - 1}`).className = 'gridblock unvisited';
646645
if (col != 53)
647646
document.getElementById(`node-${row}-${col + 1}`).className = 'gridblock unvisited';
648-
if (row != 18)
647+
if (row != 20)
649648
document.getElementById(`node-${row + 1}-${col}`).className = 'gridblock unvisited';
650649

651650
}
@@ -850,6 +849,6 @@ class GridLayout extends Component {
850849
/div>
851850
)
852851
}
853-
}
852+
}
854853

855-
export default GridLayout;
854+
export default GridLayout;

‎src/css/gridblock.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
position: relative;
99
}
1010
.grid-container {
11-
margin:100px0px0px;
11+
1212
}
1313

1414
.start {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /