-
-
Save raydiak/59350a91715982755e8ffe4a76d6667b to your computer and use it in GitHub Desktop.
slots
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env raku | |
my Int $cost = 1; | |
my %wheel = 7 => 20, 'π' => 10, 'π' => 8, 'π' => 6, 'π' => 5, 'π' => 4, 'π' => 3; | |
my @result = %wheel.keys.roll(3); | |
say @result; | |
if [eq] @result { | |
my $profit = $cost * %wheel{@result[0]}; | |
say 'win' ~ " ($profit)"; | |
} else { | |
say 'lose'; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment