-- | Move Block from pos to newPos
moveBlock :: Level -> Coord -> Coord -> Level
moveBlock lvl pos newPos
  | S.member pos blocks = lvl { lBlocks = blocks' }
  | otherwise           = lvl
  where
    blocks = lBlocks lvl
    blocks' = S.insert newPos $ S.delete pos blocks

-- | Push a block at coord 1 position in the given
--   direction.
moveBlock :: Level -> Coord -> Coord -> Level
moveBlock lvl pos newPos
  | S.member pos blocks = lvl { lBlocks = blocks' }
  | otherwise           = lvl
  where
    blocks = lBlocks lvl
    blocks' = S.insert newPos $ S.delete pos blocks

-- | Push a block at coord 1 position in the given
--   direction.
moveBlock lvl pos newPos
  | S.member pos blocks = lvl { lBlocks = blocks' }
  | otherwise           = lvl
  where
    blocks = lBlocks lvl
    blocks' = S.insert newPos $ S.delete pos blocks

-- | Push a block at coord 1 position in the given
--   direction.