Skip to content

Commit 77e04a4

Browse files
StartAutomatingStartAutomating
authored andcommitted
feat: Turtle.Horizontal/VerticalLine ( Fixes #126 )
1 parent 6f710c5 commit 77e04a4

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

Turtle.types.ps1xml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,10 @@
3939
<Name>fd</Name>
4040
<ReferencedMemberName>Forward</ReferencedMemberName>
4141
</AliasProperty>
42+
<AliasProperty>
43+
<Name>HLineBy</Name>
44+
<ReferencedMemberName>HorizontalLine</ReferencedMemberName>
45+
</AliasProperty>
4246
<AliasProperty>
4347
<Name>l</Name>
4448
<ReferencedMemberName>Left</ReferencedMemberName>
@@ -83,6 +87,10 @@
8387
<Name>up</Name>
8488
<ReferencedMemberName>PenUp</ReferencedMemberName>
8589
</AliasProperty>
90+
<AliasProperty>
91+
<Name>VLineBy</Name>
92+
<ReferencedMemberName>VerticalLine</ReferencedMemberName>
93+
</AliasProperty>
8694
<AliasProperty>
8795
<Name>xPos</Name>
8896
<ReferencedMemberName>xcor</ReferencedMemberName>
@@ -572,6 +580,27 @@ return $this.Teleport(0,0)
572580

573581
</Script>
574582
</ScriptMethod>
583+
<ScriptMethod>
584+
<Name>HorizontalLine</Name>
585+
<Script>
586+
&lt;#
587+
.SYNOPSIS
588+
Draws a horizontal line
589+
.DESCRIPTION
590+
Draws a horizontal line.
591+
592+
The heading will not be changed.
593+
#&gt;
594+
param(
595+
[double]
596+
$Distance
597+
)
598+
599+
600+
$this.GoTo($this.Position.X + $Distance, $this.Position.Y)
601+
602+
</Script>
603+
</ScriptMethod>
575604
<ScriptMethod>
576605
<Name>Jump</Name>
577606
<Script>
@@ -1628,6 +1657,26 @@ return $this.LSystem('FX+FX+', [Ordered]@{
16281657

16291658
</Script>
16301659
</ScriptMethod>
1660+
<ScriptMethod>
1661+
<Name>VerticalLine</Name>
1662+
<Script>
1663+
&lt;#
1664+
.SYNOPSIS
1665+
Draws a vertical line
1666+
.DESCRIPTION
1667+
Draws a vertical line.
1668+
1669+
The heading will not be changed.
1670+
#&gt;
1671+
param(
1672+
[double]
1673+
$Distance
1674+
)
1675+
1676+
$this.GoTo($this.Position.X, $this.Position.Y + $Distance)
1677+
1678+
</Script>
1679+
</ScriptMethod>
16311680
<ScriptMethod>
16321681
<Name>xcor</Name>
16331682
<Script>

0 commit comments

Comments
 (0)