@logic-pad/core 0.10.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -153,29 +153,29 @@ class DirectionLinkerSymbol extends Symbol {
|
|
|
153
153
|
}
|
|
154
154
|
// 1x2
|
|
155
155
|
if (x % 1 === 0) {
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
y: y
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
}, grid)
|
|
165
|
-
|
|
156
|
+
if (this.linkedDirections[Direction.Up] === Direction.Up &&
|
|
157
|
+
this.linkedDirections[Direction.Down] === Direction.Down) {
|
|
158
|
+
return [
|
|
159
|
+
makeTurtle({ x, y: y - 0.5 }, { x, y: y - 0.5 }, grid),
|
|
160
|
+
makeTurtle({ x, y: y + 0.5 }, { x, y: y + 0.5 }, grid),
|
|
161
|
+
];
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
return [makeTurtle({ x, y: y - 0.5 }, { x, y: y + 0.5 }, grid)];
|
|
165
|
+
}
|
|
166
166
|
}
|
|
167
167
|
// 2x1
|
|
168
168
|
if (y % 1 === 0) {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
}, grid)
|
|
178
|
-
|
|
169
|
+
if (this.linkedDirections[Direction.Left] === Direction.Left &&
|
|
170
|
+
this.linkedDirections[Direction.Right] === Direction.Right) {
|
|
171
|
+
return [
|
|
172
|
+
makeTurtle({ x: x - 0.5, y }, { x: x - 0.5, y }, grid),
|
|
173
|
+
makeTurtle({ x: x + 0.5, y }, { x: x + 0.5, y }, grid),
|
|
174
|
+
];
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
return [makeTurtle({ x: x - 0.5, y }, { x: x + 0.5, y }, grid)];
|
|
178
|
+
}
|
|
179
179
|
}
|
|
180
180
|
// 2x2
|
|
181
181
|
if (this.linkedDirections[Direction.Left] === Direction.Left &&
|