Skip to content

Commit 81e46e4

Browse files
StartAutomatingStartAutomating
authored andcommitted
feat: Turtle.get_Stack ( Fixes #93 )
1 parent 5a38fc1 commit 81e46e4

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

Turtle.types.ps1xml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -365,10 +365,10 @@ return $this
365365
[double]$Angle = 90
366366
)
367367

368-
return $this.LSystem('A', @{
368+
return $this.LSystem('A', [Ordered]@{
369369
A = '+BF-AFA-FB+'
370370
B = '-AF+BFB+FA-'
371-
}, $Order, @{
371+
}, $Order, [Ordered]@{
372372
'F' = { $this.Forward($Size) }
373373
'\+' = { $this.Rotate($Angle) }
374374
'\-' = { $this.Rotate($Angle * -1) }
@@ -1837,6 +1837,16 @@ if ($posY -gt $this.'.Maximum'.Y) {
18371837
}
18381838
</SetScriptBlock>
18391839
</ScriptProperty>
1840+
<ScriptProperty>
1841+
<Name>Stack</Name>
1842+
<GetScriptBlock>
1843+
if ($null -ne $this.'.Stack'.Count) {
1844+
$this | Add-Member NoteProperty '.Stack' ([Collections.Stack]::new()) -Force
1845+
}
1846+
$this.'.Stack'
1847+
1848+
</GetScriptBlock>
1849+
</ScriptProperty>
18401850
<ScriptProperty>
18411851
<Name>Steps</Name>
18421852
<GetScriptBlock>

0 commit comments

Comments
 (0)