moveNodes :: Input a => a -> Node a -> StGNG a ()
moveNodes input node = do
    gng <- State.get
    let (nv, d) = move (node^.value) input (gng^.settings^.moveRatio1)
    modifyNode (\n -> n&value .~ nv &moved %~ (+d)) (node^.nodeId)
    nnids <- neighbors
    forM_ nnids $ modifyNode $ f gng
  where
    neighbors = do
        gng <- State.get
        return
            $ map (otherNode node)
            $ getAll (gng^.edges)
            $ (node^.edgeIds)
    f gng n = n&value .~ v
               &moved %~ (+d)
      where
        (v, d) = move (n^.value) input (gng^.settings^.moveRatio2)
moveNodes :: Input a => a -> Node a -> StGNG a ()
moveNodes input node = do
    gng <- State.get
    let (nv, d) = move (node^.value) input (gng^.settings^.moveRatio1)
    modifyNode (\n -> n&value .~ nv &moved %~ (+d)) (node^.nodeId)
    nnids <- neighbors
    forM_ nnids $ modifyNode $ f gng
  where
    neighbors = do
        gng <- State.get
        return
            $ map (otherNode node)
            $ getAll (gng^.edges)
            $ (node^.edgeIds)
    f gng n = n&value .~ v
               &moved %~ (+d)
      where
        (v, d) = move (n^.value) input (gng^.settings^.moveRatio2)
moveNodes input node = do
    gng <- State.get
    let (nv, d) = move (node^.value) input (gng^.settings^.moveRatio1)
    modifyNode (\n -> n&value .~ nv &moved %~ (+d)) (node^.nodeId)
    nnids <- neighbors
    forM_ nnids $ modifyNode $ f gng
  where
    neighbors = do
        gng <- State.get
        return
            $ map (otherNode node)
            $ getAll (gng^.edges)
            $ (node^.edgeIds)
    f gng n = n&value .~ v
               &moved %~ (+d)
      where
        (v, d) = move (n^.value) input (gng^.settings^.moveRatio2)