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

Tentacle sex automaton

Name: Anonymous 2013-09-10 17:18

I found this weird old Python file on my hard drive (which I think I got here) and tried reimplementing it in Haskell for shits and giggles. The original had a more verbose, plain text output, but I changed it to a curses-based thing to make debugging easy.

Guess I'll post it in several parts:

{-# LANGUAGE RecordWildCards, OverloadedStrings #-}
import Actors
import Races
import Simulate
import UI

import qualified Data.Text as T
import qualified Data.Text.IO as T

showText :: Show r => r -> T.Text
showText = T.pack . show

inYears n = n `div` 7

describe (Actor{..}) = T.concat
  [ T.concat names
  , ", a "
  , showText $ inYears age
  , "-year-old "
  , showText gender
  , " "
  , speciesName species
  , " at "
  , showText location
  ]

condition World{..} =
  length actors > 50 ||
  null actors ||
  tickNumber > 100

main = runGame

Name: Anonymous 2013-09-11 10:55

but I changed it to a curses-based thing to make debugging easy.
That's why TDD exists, fucking shitfucker

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