More complex 35 bytes solution :#!perl -pl /\d+\+/;$-+=rand$&for 1..$_;$_+=$'+$-
Due to the use of $', they can’t easily be ran from the command-line. Just store them in a file.#!perl -pl s/d/q(+~~rand($')+d)x$`/e;$_=eval
In reply to Re: Dungeons and Dragons die roller (Golf)
by Grimy
in thread Dungeons and Dragons die roller (Golf)
by zsl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |