Skip to content

Commit 44fa089

Browse files
feat: Turtle.Push() ( Fixes #91 )
1 parent 3b10a33 commit 44fa089

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Types/Turtle/Push.ps1

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
if (-not $this.'.Stack') {
2+
$this | Add-Member NoteProperty '.Stack' ([Collections.Stack]::new()) -Force
3+
}
4+
5+
$this.'.Stack'.Push(@{
6+
Position = [Ordered]@{X=$this.Position.X;Y=$this.Position.Y}
7+
Heading = $this.Heading
8+
})
9+
return $this

0 commit comments

Comments
 (0)