X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=src%2Ftask1%2Ftask1.hs;h=e7a4f4bacf3770fe7192a9296eaa84dafa58b2a1;hb=0ada5a1833d263689d2f29eabf203a1eb163f84d;hp=071fe68f3d1310f88b1f35e42c83cbee92e9ae41;hpb=c3a235494fa4e2aca91cadf94b3c5890baa7734e;p=summerofcode2018soln.git diff --git a/src/task1/task1.hs b/src/task1/task1.hs index 071fe68..e7a4f4b 100644 --- a/src/task1/task1.hs +++ b/src/task1/task1.hs @@ -2,13 +2,15 @@ import Data.List (foldl') -- import the strict fold -- number of steps type Distance = Int + +-- easting, northing type Position = (Int, Int) -- the directions. See below for functions for turning data Direction = North | East | South | West deriving (Enum, Show, Bounded, Eq) --- direction, easting, northing +-- the currenct state of a Mowmaster data Mowmaster = Mowmaster { direction :: Direction , position :: Position } deriving (Show, Eq)