-- q = 0,1,2,3

centerCoord :: Int -> Int
centerCoord x
  | abs (x-1) <= 1 = 1
  | abs (x-4) <= 1 = 4
  | otherwise      = error "bad coordinate"
centerCoord :: Int -> Int
centerCoord x
  | abs (x-1) <= 1 = 1
  | abs (x-4) <= 1 = 4
  | otherwise      = error "bad coordinate"
centerCoord x
  | abs (x-1) <= 1 = 1
  | abs (x-4) <= 1 = 4
  | otherwise      = error "bad coordinate"