We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Turtle.Push()
1 parent 44fa089 commit 7764053Copy full SHA for 7764053
Turtle.types.ps1xml
@@ -804,6 +804,20 @@ $null = foreach ($n in 1..$SideCount) {
804
$this.Forward($Size)
805
$this.Rotate(360 / $SideCount)
806
}
807
+return $this
808
+ </Script>
809
+ </ScriptMethod>
810
+ <ScriptMethod>
811
+ <Name>Push</Name>
812
+ <Script>
813
+ if (-not $this.'.Stack') {
814
+ $this | Add-Member NoteProperty '.Stack' ([Collections.Stack]::new()) -Force
815
+}
816
+
817
+$this.'.Stack'.Push(@{
818
+ Position = [Ordered]@{X=$this.Position.X;Y=$this.Position.Y}
819
+ Heading = $this.Heading
820
+})
821
return $this
822
</Script>
823
</ScriptMethod>
0 commit comments