Data update
This commit is contained in:
parent
5150844a7d
commit
4bb20c9b71
7735 changed files with 38060 additions and 199180 deletions
|
|
@ -1,27 +0,0 @@
|
|||
$Size = 100
|
||||
|
||||
$G = @()
|
||||
1..$Size | ForEach { $G += ,( @( 1 ) * $Size ) }
|
||||
|
||||
$x = $y = $Size / 2
|
||||
|
||||
# Direction of next move
|
||||
$Dx = 1
|
||||
$Dy = 0
|
||||
|
||||
# While we are still on the grid...
|
||||
While ( $x -ge 0 -and $y -ge 0 -and $x -lt $Size -and $y -lt $Size )
|
||||
{
|
||||
# Change direction
|
||||
$Dx, $Dy = ( $Dy * $G[$x][$y] ), -( $Dx * $G[$x][$y] )
|
||||
|
||||
# Change state of current square
|
||||
$G[$x][$y] = -$G[$x][$y]
|
||||
|
||||
# Move forward
|
||||
$x += $Dx
|
||||
$y += $Dy
|
||||
}
|
||||
|
||||
# Convert to strings for output
|
||||
ForEach ( $Row in $G ) { ( $Row | ForEach { ( ' ', '', '#')[$_+1] } ) -join '' }
|
||||
Loading…
Add table
Add a link
Reference in a new issue