Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

The /prog/ game

Name: Anonymous 2009-05-25 14:46

Pussies: Post link to project, doesn't matter if there is no source code. No HTML, faggots.
Average programmers: Post source code. If your program is too long to be posted here, see pussies.
Real men: Write a program from scratch and post source code. DON'T TEST IT.

Name: Anonymous 2009-05-25 15:18

import IO, Char (toLower)

-- game works like a state machine
main = startRoom ["a copy of SICP"]

startRoom :: IO ()
startRoom inventory = do
    putStrLn "Hello young lambda knight!"
    putStrLn "What do you want to do?"
    choice <- getLine
    case (map toLower choice) of
        exit -> putStrLn "Bye!"
        -- TODO: add more possible inputs
        _ -> putStrLn "Unrecognized command." >> startRoom

-- TODO: add more rooms

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List