diff options
author | Andinus <andinus@nand.sh> | 2021-04-27 22:02:04 +0530 |
---|---|---|
committer | Andinus <andinus@nand.sh> | 2021-04-27 22:02:04 +0530 |
commit | 5699218bc232ad7c4ddd611757169e17be33c342 (patch) | |
tree | 96a46b12fc49e2035847b42b67ef6b1e966d0197 | |
parent | 6832a0ffe038527c9c97dd38918c643f7748407a (diff) | |
download | caelum-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.rakumod | 2 |
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; } |