- or download this
sub follow_paths {
my ($x_s,$y_s,$s_s,$paths,$regs) = @_;
...
}
return \@current;
}
- or download this
regs =
1,0,0
...
3,0,0 =>
0,1,0
1,0,0
- or download this
[[3,0,0]
[0,1,0]
...
[[3,0,0]
[1,0,0,'reg']
]
- or download this
sub follow_paths_unrolled {
my ($x_s,$y_s,$s_s,$paths,$regs) = @_;
...
($cur_x,$cur_y,$cur_s,$index,$current,$BRANCH) = @{pop @STACK}
+;
}
}