@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
- return [
157
- makeTurtle({ x, y: y - 0.5 }, {
158
- x,
159
- y: y +
160
- (this.linkedDirections[Direction.Up] === Direction.Up &&
161
- this.linkedDirections[Direction.Down] === Direction.Down
162
- ? -0.5
163
- : 0.5),
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
- return [
170
- makeTurtle({ x: x - 0.5, y }, {
171
- x: x +
172
- (this.linkedDirections[Direction.Left] === Direction.Left &&
173
- this.linkedDirections[Direction.Right] === Direction.Right
174
- ? -0.5
175
- : 0.5),
176
- y,
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 &&
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@logic-pad/core",
3
- "version": "0.10.0",
3
+ "version": "0.10.1",
4
4
  "type": "module",
5
5
  "files": [
6
6
  "dist",