cellIdentify :: Img -> CellCoords -> (Int,Int) -> Cell
cellIdentify img ccs coord = result
  where conts = cellContents img ccs coord
        mainColours = catMaybes (map (\p -> lookup (fst p) colours) conts)
        result = case mainColours of
                   (-1:3:7:_) -> Flagged
                   (-1:7:3:_) -> Flagged
                   (-1:_) -> Unknown
                   (n:_) -> Revealed n
                   _ -> Revealed 0
cellIdentify :: Img -> CellCoords -> (Int,Int) -> Cell
cellIdentify img ccs coord = result
  where conts = cellContents img ccs coord
        mainColours = catMaybes (map (\p -> lookup (fst p) colours) conts)
        result = case mainColours of
                   (-1:3:7:_) -> Flagged
                   (-1:7:3:_) -> Flagged
                   (-1:_) -> Unknown
                   (n:_) -> Revealed n
                   _ -> Revealed 0
cellIdentify img ccs coord = result
  where conts = cellContents img ccs coord
        mainColours = catMaybes (map (\p -> lookup (fst p) colours) conts)
        result = case mainColours of
                   (-1:3:7:_) -> Flagged
                   (-1:7:3:_) -> Flagged
                   (-1:_) -> Unknown
                   (n:_) -> Revealed n
                   _ -> Revealed 0