summaryrefslogtreecommitdiff
path: root/src/Mahjong
diff options
context:
space:
mode:
Diffstat (limited to 'src/Mahjong')
-rw-r--r--src/Mahjong/Point.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Mahjong/Point.hs b/src/Mahjong/Point.hs
new file mode 100644
index 0000000..d2ae679
--- /dev/null
+++ b/src/Mahjong/Point.hs
@@ -0,0 +1,9 @@
+module Point where
+
+calPoint (han,fu)
+ | han < 6 = if med > 2000 then 2000 else med
+ where med = fu*(2**(han+2))
+ | han < 8 = 3000
+ | han < 11 = 4000
+ | han < 13 = 6000
+ | otherwise = 8000