Posts

Showing posts from December, 2011

Mastermind Game - Repost (Game I wrote back in 07 to teach intermediate haskell)

-- Mastermind Game - Fri 18-11-2007  -- CS11A - Introduction to Computer Science  --This module controls the utility functions for the graphics e.g. mouse events, Font Operations... uncomment of using winhugs b4 2006  --import GraphicsUtils  --import SOEGraphics import  Graphics.HGL  --Graphics modules as to be imported for Grapics to be produced. import  Graphics.HGL.Utils  --This module controls the utility functions for the graphics e.g. mouse events, Font Operations import  Random  --Imported to allow the random functions to be used import  Prelude hiding (read)  --The Prelude as been imported and the function read hidden so that my version can be used import  Data.List (sort)  --Imported to allow the sort function to be used import  Data.Char (toLower)  --Imported to allow the toLower function to be used --The following Emurated type hold all the colors to be used  data Colors = Gr | Cy | Bk | Mg | Yw | Bl deriving (Eq, Ord, Show) --The followi