File tree Expand file tree Collapse file tree 3 files changed +18
-1
lines changed
Expand file tree Collapse file tree 3 files changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -6,5 +6,9 @@ $Distance = 10
66$x = $Distance * [math ]::round([math ]::cos($this.Heading * [Math ]::PI / 180 ), 15 )
77$y = $Distance * [math ]::round([math ]::sin($this.Heading * [Math ]::PI / 180 ), 15 )
88$this.Position = $x , $y
9- $this.Steps += " l $x $y "
9+ if ($This.IsPenDown ) {
10+ $this.Steps += " l $x $y "
11+ } else {
12+ $this.Steps += " m $x $y "
13+ }
1014return $this
Original file line number Diff line number Diff line change 1+ if ($null -ne $this .' .IsPenDown' ) { return $this .' .IsPenDown' }
2+ return $true
Original file line number Diff line number Diff line change 1+ param (
2+ [bool ]
3+ $IsDown
4+ )
5+
6+ $this |
7+ Add-Member - MemberType NoteProperty - Force - Name ' .IsPenDown' - Value $IsDown
8+
9+ if ($VerbosePreference -ne ' SilentlyContinue' ) {
10+ Write-Verbose " Turtle is now $ ( $IsDown ? ' down' : ' up' ) "
11+ }
You can’t perform that action at this time.
0 commit comments