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.Pop()
1 parent a05d068 commit 1f8492eCopy full SHA for 1f8492e
Turtle.types.ps1xml
@@ -804,6 +804,23 @@ $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>Pop</Name>
812
+ <Script>
813
+ if ($this.'.Stack' -isnot [Collections.Stack]) {
814
+ return
815
+}
816
+
817
+if ($this.'.Stack'.Count -eq 0) {
818
819
820
821
+$popped = $this.'.Stack'.Pop()
822
+$this.PenUp().Goto($popped.Position.X, $popped.Position.Y).PenDown()
823
+$this.Heading = $popped.Heading
824
return $this
825
</Script>
826
</ScriptMethod>
0 commit comments