quoridor-hs-0.1.0.0: A Quoridor implementation in Haskell

Safe HaskellNone
LanguageHaskell2010

Quoridor.Cmdline.Render

Synopsis

Documentation

runRender :: GameState -> GameConfig -> [Cell] -> String Source

Returns a String of the game board along with some basic info

runRenderColor :: GameState -> GameConfig -> [Cell] -> (String, [Color]) Source

Returns a String of the game board along with some basic info, and a series of IO () actions, one per character, which describe how to set the terminal color. putColoredStr can be used to apply those actions automatically

putColoredStrTerm :: (String, [Color]) -> IO () Source

Given an input such as the output of runRenderColor, writes the game board along with some basic info, to the screen, applying the IO actions to colorize the output.

putColoredStrHtml :: (String, [Color]) -> IO () Source

This is wasteful compared to having this logic in the browser's javascript. However this is still amounts to very little data being transferred, and that way I can avoid duplicating the coloring logic"