aboutsummaryrefslogtreecommitdiff
path: root/challenge-052
diff options
context:
space:
mode:
Diffstat (limited to 'challenge-052')
-rwxr-xr-xchallenge-052/jaldhar-h-vyas/raku/ch-2.p615
1 files changed, 9 insertions, 6 deletions
diff --git a/challenge-052/jaldhar-h-vyas/raku/ch-2.p6 b/challenge-052/jaldhar-h-vyas/raku/ch-2.p6
index 7f8900b6db..44f88f6532 100755
--- a/challenge-052/jaldhar-h-vyas/raku/ch-2.p6
+++ b/challenge-052/jaldhar-h-vyas/raku/ch-2.p6
@@ -29,10 +29,13 @@ sub run(Bool $playerTurn_) {
}
}
-say 'Assuming both take the best coin...';
-for (True, False) -> $playerTurn {
- print 'If the ', ($playerTurn ?? 'player' !! 'computer'), ' goes first, ';
- my ($winner, $amount) = run($playerTurn);
- print 'the ', ($winner ?? 'player' !! 'computer'), ' wins with £',
- $amount, ".\n";
+multi sub MAIN() {
+ say 'Assuming both take the best coin...';
+ for (True, False) -> $playerTurn {
+ print 'If the ', ($playerTurn ?? 'player' !! 'computer'),
+ ' goes first, ';
+ my ($winner, $amount) = run($playerTurn);
+ print 'the ', ($winner ?? 'player' !! 'computer'), ' wins with £',
+ $amount, ".\n";
+ }
} \ No newline at end of file