dartPrompt gst = do
  gsraw' <- readIORef gst
  let gsraw = gsraw' {ctime = (incrementT (ctime gsraw'))}
      gstate = gamecard gsraw
      pn = cplayer gsraw
      play = getPlayer pn gstate
  print gstate
  putStr $ "\nEnter the dart you hit, a single space, and the number of markings.\
           \\nFor example: 15 3 ,15 2, 15 1 or 0 for nothing.\n" ++ name play ++
           ": "
  hFlush stdout
  ds <- getValidInput play
  if ds /= "skip"
   then do let marked = mark (getPlayer pn gstate) (getPlayer (increment pn) gstate) ds
           writeIORef gst gsraw {gamecard = (setPlayer pn gstate marked)
                                ,cplayer = (if ctime gsraw == 0 then increment pn else pn)}
           return gst
   else writeIORef gst gsraw {cplayer = (increment pn), ctime = 0} >> return gst
dartPrompt gst = do
  gsraw' <- readIORef gst
  let gsraw = gsraw' {ctime = (incrementT (ctime gsraw'))}
      gstate = gamecard gsraw
      pn = cplayer gsraw
      play = getPlayer pn gstate
  print gstate
  putStr $ "\nEnter the dart you hit, a single space, and the number of markings.\
           \\nFor example: 15 3 ,15 2, 15 1 or 0 for nothing.\n" ++ name play ++
           ": "
  hFlush stdout
  ds <- getValidInput play
  if ds /= "skip"
   then do let marked = mark (getPlayer pn gstate) (getPlayer (increment pn) gstate) ds
           writeIORef gst gsraw {gamecard = (setPlayer pn gstate marked)
                                ,cplayer = (if ctime gsraw == 0 then increment pn else pn)}
           return gst
   else writeIORef gst gsraw {cplayer = (increment pn), ctime = 0} >> return gst
dartPrompt gst = do
  gsraw' <- readIORef gst
  let gsraw = gsraw' {ctime = (incrementT (ctime gsraw'))}
      gstate = gamecard gsraw
      pn = cplayer gsraw
      play = getPlayer pn gstate
  print gstate
  putStr $ "\nEnter the dart you hit, a single space, and the number of markings.\
           \\nFor example: 15 3 ,15 2, 15 1 or 0 for nothing.\n" ++ name play ++
           ": "
  hFlush stdout
  ds <- getValidInput play
  if ds /= "skip"
   then do let marked = mark (getPlayer pn gstate) (getPlayer (increment pn) gstate) ds
           writeIORef gst gsraw {gamecard = (setPlayer pn gstate marked)
                                ,cplayer = (if ctime gsraw == 0 then increment pn else pn)}
           return gst
   else writeIORef gst gsraw {cplayer = (increment pn), ctime = 0} >> return gst