about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2021-04-27 22:02:04 +0530
committerAndinus <andinus@nand.sh>2021-04-27 22:02:04 +0530
commit5699218bc232ad7c4ddd611757169e17be33c342 (patch)
tree96a46b12fc49e2035847b42b67ef6b1e966d0197
parent6832a0ffe038527c9c97dd38918c643f7748407a (diff)
downloadcaelum-5699218bc232ad7c4ddd611757169e17be33c342.tar.gz
Fix winning logic
Previously the winning logic was faulty, it sorted players by their
wallets. Now it sorts them by their points.
-rw-r--r--lib/Caelum/CLI.rakumod2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Caelum/CLI.rakumod b/lib/Caelum/CLI.rakumod
index ab2b6e9..1ef4039 100644
--- a/lib/Caelum/CLI.rakumod
+++ b/lib/Caelum/CLI.rakumod
@@ -81,7 +81,7 @@ multi sub MAIN(
             }
         }
 
-        with @players.sort(*.wallet).reverse[0] -> $player {
+        with @players.sort(*.points).reverse[0] -> $player {
             say "{$player.name} wins $pot!";
             $player.wallet += $pot;
         }