Source. [5034f5a2f7a555ed]

grid6 :: Diagram B
grid6 = mconcat
  [ nodes
  , horiz # alignBL
  , horiz # rotateBy (1/4) # alignBL
  ]
  where
    horiz :: Diagram B
    horiz = vsep 1 (replicate 6 (hrule 5))

    nodes = circle 0.07 # fc white
      # replicate 6
      # cat' (V2 0 1) (with & catMethod .~ Distrib & sep .~ 1)
      # replicate 6
      # hcat' (with & catMethod .~ Distrib & sep .~ 1)

drawGrid :: [(Int,Int)] -> [[(Int,Int)]] -> Diagram B
drawGrid vs paths = mconcat
  [ foldMap drawVertex vs
  , grid6
  , foldMap drawPath paths
  ]
  # lw thin
  where
    drawVertex = place start . toP2
    start = circle 0.15 # fc black

    drawPath = lc grey . lwL 0.1 . strokeP . fromVertices . map toP2

    toP2 = p2 . over both fromIntegral

starts  = [(0,3), (1,2), (1,3), (1,4), (3,2), (3,3), (3,4), (5,2), (5,3), (5,4)]
escapes =
  [ [(1,2), (2,2), (2,1), (2,0)]
  , [(1,3), (2,3), (2,4), (2,5)]
  , [(1,4), (1,5)]
  , [(3,2), (3,1), (3,0)]
  , [(3,4), (3,5)]
  , [(3,3), (4,3), (4,4), (4,5)]
  ]

dia = hsep 2
  [ drawGrid starts escapes
  , drawGrid ((4,3) : starts) []
  ]