Last active
December 15, 2015 11:29
-
-
Save nushio3/5253576 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
main :: IO () | |
main = top 10 | |
top :: Int -> IO () | |
top mp = do | |
putStrLn $ "あなたのMPは:" ++ show mp | |
putStrLn "どこへ行く?" | |
choice [ ("宿屋" , inn) | |
, ("野外" , outdoor mp) ] | |
inn = do | |
putStrLn "あなたはぐっすり眠った。" | |
top 10 | |
outdoor mp = do | |
putStrLn "マネジメント上の問題が現れた!!どうする?" | |
choice [ ("殴る" , fight) | |
, ("メラ" , magic 3 mp) | |
, ("イオナズン", magic 100 mp) ] | |
fight = do | |
putStrLn "_人人人人人人人_" | |
putStrLn "> 突然の突き指 <" | |
putStrLn " ̄Y^Y^Y^Y^Y^Y^Y ̄" | |
putStrLn "あなたは死にました・・・" | |
magic costMp mp | |
| costMp > mp = do | |
putStrLn "MPが足りない" | |
putStrLn "あなたは死にました・・・" | |
| otherwise = do | |
putStrLn "炎上マーケティング!!" | |
putStrLn "マネジメント上の問題を解決した" | |
top (mp - costMp) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment