Gespiegelte Felder werden richtig erkannt
This commit is contained in:
@@ -5333,6 +5333,7 @@ class LeafSegment extends Segment {
|
||||
}
|
||||
|
||||
sameAs(otherSegment) {
|
||||
// debugger;
|
||||
return (otherSegment instanceof LeafSegment && otherSegment.leaf === this.leaf);
|
||||
}
|
||||
|
||||
@@ -5521,9 +5522,10 @@ class ParentSegment extends Segment {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
console.log(this.rotation, this.children, this.children[0].sameAs(this.children[3]), this.children[1].sameAs(this.children[2]), this.children[0].sameAs(this.children[1]));
|
||||
return (this.rotation === 0 || (
|
||||
this.children[0].sameAs(this.children[2]) && this.children[1].sameAs(this.children[3]) && (
|
||||
this.rotation === 2 || this.children[0].sameAs(this.children[1]))))
|
||||
this.children[0].sameAs(this.children[3]) && this.children[1].sameAs(this.children[2]) && (
|
||||
this.rotation === 180 || this.children[0].sameAs(this.children[1]))))
|
||||
}
|
||||
|
||||
setChildren(children) {
|
||||
|
||||
Reference in New Issue
Block a user