mirror of
https://github.com/FraMecca/Buridans_donkey.git
synced 2024-03-20 11:20:15 +01:00
24 lines
377 B
D
24 lines
377 B
D
|
import std.stdio;
|
||
|
import std.random;
|
||
|
import std.getopt;
|
||
|
|
||
|
void
|
||
|
main (string[] args)
|
||
|
{
|
||
|
bool num;
|
||
|
auto cliOpts = getopt (
|
||
|
args,
|
||
|
"no-numbers|n", "disable number output on screen", &num);
|
||
|
|
||
|
args = args[1 .. $];
|
||
|
Mt19937 gen;
|
||
|
gen.seed (unpredictableSeed);
|
||
|
randomShuffle (args);
|
||
|
|
||
|
foreach (i, arg; args) {
|
||
|
if (num) writeln (arg);
|
||
|
else writefln ("%s: %s", i, arg);
|
||
|
}
|
||
|
|
||
|
}
|