initializeWorld :: IORef World -> IO ()
initializeWorld worldRef = do
    _ <- getArgsAndInitialize
    let pixelsPerUnit = 10
        w = pixelsPerUnit * fromIntegral P.width
        h = pixelsPerUnit * fromIntegral P.height
    initialDisplayMode $= [RGBMode, DoubleBuffered]
    initialWindowSize $= Size w h
    (Size screenSizeX screenSizeY) <- get screenSize
    let initialPos = Position
            (fromIntegral (screenSizeX - w) `div` 2)
            (fromIntegral (screenSizeY - h) `div` 2)
    initialWindowPosition $= initialPos
    _ <- createWindow "Evolverbetert v1"
    matrixMode $= Projection
    loadIdentity
    ortho2D 0 (fromIntegral w / fromIntegral pixelsPerUnit)
            0 (fromIntegral h / fromIntegral pixelsPerUnit)

    displayCallback $= showWorld worldRef
    actionOnWindowClose $= MainLoopReturns
initializeWorld :: IORef World -> IO ()
initializeWorld worldRef = do
    _ <- getArgsAndInitialize
    let pixelsPerUnit = 10
        w = pixelsPerUnit * fromIntegral P.width
        h = pixelsPerUnit * fromIntegral P.height
    initialDisplayMode $= [RGBMode, DoubleBuffered]
    initialWindowSize $= Size w h
    (Size screenSizeX screenSizeY) <- get screenSize
    let initialPos = Position
            (fromIntegral (screenSizeX - w) `div` 2)
            (fromIntegral (screenSizeY - h) `div` 2)
    initialWindowPosition $= initialPos
    _ <- createWindow "Evolverbetert v1"
    matrixMode $= Projection
    loadIdentity
    ortho2D 0 (fromIntegral w / fromIntegral pixelsPerUnit)
            0 (fromIntegral h / fromIntegral pixelsPerUnit)

    displayCallback $= showWorld worldRef
    actionOnWindowClose $= MainLoopReturns
initializeWorld worldRef = do
    _ <- getArgsAndInitialize
    let pixelsPerUnit = 10
        w = pixelsPerUnit * fromIntegral P.width
        h = pixelsPerUnit * fromIntegral P.height
    initialDisplayMode $= [RGBMode, DoubleBuffered]
    initialWindowSize $= Size w h
    (Size screenSizeX screenSizeY) <- get screenSize
    let initialPos = Position
            (fromIntegral (screenSizeX - w) `div` 2)
            (fromIntegral (screenSizeY - h) `div` 2)
    initialWindowPosition $= initialPos
    _ <- createWindow "Evolverbetert v1"
    matrixMode $= Projection
    loadIdentity
    ortho2D 0 (fromIntegral w / fromIntegral pixelsPerUnit)
            0 (fromIntegral h / fromIntegral pixelsPerUnit)

    displayCallback $= showWorld worldRef
    actionOnWindowClose $= MainLoopReturns