Skip to content

Commit 280f822

Browse files
feat: Turtle.Step() ( Fixes #161 )
Using `.Step()` in `Teleport()`
1 parent 3e1b98a commit 280f822

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Types/Turtle/Teleport.ps1

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ $Y
1818

1919
$deltaX = $x - $this.X
2020
$deltaY = $y - $this.Y
21-
$this.Steps += "m $deltaX $deltaY"
22-
$this.Position = $deltaX, $deltaY
21+
$penState = $this.IsPenDown
22+
$this.IsPenDown = $false
23+
$null = $this.Step($deltaX, $deltaY)
24+
$this.IsPenDown = $penState
2325
return $this

0 commit comments

Comments
 (0)