diff options
Diffstat (limited to 'rules/random_choice.pl')
-rw-r--r-- | rules/random_choice.pl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/rules/random_choice.pl b/rules/random_choice.pl new file mode 100644 index 0000000..3bd4a91 --- /dev/null +++ b/rules/random_choice.pl @@ -0,0 +1,2 @@ +random_choice(_, Choice, _, _) :- + random(Number), (Number < 0.5 -> Choice=c ; Choice=d). |