oneGame :: (Agent2 a1, Agent2 a2) => a1 -> a2 -> ThrLocIO (Maybe Player2)
oneGame a1 a2 = do
  ref <- newIORef Nothing

  let g0 = freshGameDefaultParams :: Breakthrough
      cb = GameDriverCallback { gameTurn = (\ g p -> do
                               -- print p
                               -- putStrLn (prettyPrintGame (g :: Breakthrough))
                               return True)
               , gameFinished = (\ g -> do
                               let w = winner g
                               putStrLn $ "Game finished! Winner: " ++ show w
                               -- putStrLn (prettyPrintGame (g :: Breakthrough))
                               writeIORef ref w

                                )
               }

  


  driverG2 g0 a1 a2 cb

  readIORef ref
oneGame :: (Agent2 a1, Agent2 a2) => a1 -> a2 -> ThrLocIO (Maybe Player2)
oneGame a1 a2 = do
  ref <- newIORef Nothing

  let g0 = freshGameDefaultParams :: Breakthrough
      cb = GameDriverCallback { gameTurn = (\ g p -> do
                               -- print p
                               -- putStrLn (prettyPrintGame (g :: Breakthrough))
                               return True)
               , gameFinished = (\ g -> do
                               let w = winner g
                               putStrLn $ "Game finished! Winner: " ++ show w
                               -- putStrLn (prettyPrintGame (g :: Breakthrough))
                               writeIORef ref w

                                )
               }

  


  driverG2 g0 a1 a2 cb

  readIORef ref
oneGame a1 a2 = do
  ref <- newIORef Nothing

  let g0 = freshGameDefaultParams :: Breakthrough
      cb = GameDriverCallback { gameTurn = (\ g p -> do
                               -- print p
                               -- putStrLn (prettyPrintGame (g :: Breakthrough))
                               return True)
               , gameFinished = (\ g -> do
                               let w = winner g
                               putStrLn $ "Game finished! Winner: " ++ show w
                               -- putStrLn (prettyPrintGame (g :: Breakthrough))
                               writeIORef ref w

                                )
               }

  


  driverG2 g0 a1 a2 cb

  readIORef ref