about summary refs log tree commit diff stats
path: root/lib/Caelum/Player.rakumod
diff options
context:
space:
mode:
authorAndinus <andinus@nand.sh>2021-04-27 21:20:51 +0530
committerAndinus <andinus@nand.sh>2021-04-27 21:20:51 +0530
commitb8ed926e37e70c0fed538a1532ea34be013f9cb0 (patch)
tree8653dc50218c8266c8a289b9337b40f63d330910 /lib/Caelum/Player.rakumod
parentd1f7b4e0ff8e9f621a8690c67b5399393c25aa59 (diff)
downloadcaelum-b8ed926e37e70c0fed538a1532ea34be013f9cb0.tar.gz
Initial implementation
Diffstat (limited to 'lib/Caelum/Player.rakumod')
-rw-r--r--lib/Caelum/Player.rakumod8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/Caelum/Player.rakumod b/lib/Caelum/Player.rakumod
new file mode 100644
index 0000000..ea14421
--- /dev/null
+++ b/lib/Caelum/Player.rakumod
@@ -0,0 +1,8 @@
+class Player is export {
+    has Str $.name;
+    has $.points is rw;
+    has Int $.wallet is rw = 1000;
+
+    # Place a bet.
+    method bet(Int $bet) { $!wallet -= $bet; }
+}