We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 47aa6d6 commit fcfcd1dCopy full SHA for fcfcd1d
src/Row.js
@@ -53,9 +53,9 @@ class Row extends Component {
53
setID = this.generateNewSetId();
54
}
55
56
- // // check if there will be a
57
- // // random vertical connection
58
- if (this.willJoin('vertical') && !this.props.lastRow) {
+ // check if there will be a
+ // random vertical connection
+ if (this.willJoinVertical() && !this.props.lastRow) {
59
walls = {
60
...walls,
61
bottom: false
@@ -73,6 +73,9 @@ class Row extends Component {
73
this.currentCell += 1;
74
75
76
+ willJoinVertical() {
77
+ return 1 - this.props.chanceToJoin > Math.random();
78
+ }
79
80
willJoin() {
81
return this.props.chanceToJoin > Math.random();
0 commit comments