Mode:
Duration:
1
2
3
4
5
6
7
8
9
10
<?hh
<<__EntryPoint>>
function main(): void {
$steps = 10;
$pos = 0;
for ($i = 0; $i < $steps; $i++) {
$pos += (rand(0,1) === 0 ? -1 : 1);
echo $pos . "\n";
}
}Coding works best on desktop or with an external keyboard.