drawSquares :: World -> IO ()
drawSquares world = renderPrimitive Quads $ mapM_ drawQuad P.worldCoods
    where
        ags = agents world
        drawQuad :: (Int,Int) -> IO ()
        drawQuad (x, y) = do
            currentColor $= c
            vertex $ Vertex2 x0 y0
            vertex $ Vertex2 x1 y0
            vertex $ Vertex2 x1 y1
            vertex $ Vertex2 x0 y1
            where
                x0 :: GLint
                x0 = fromIntegral x
                x1 = fromIntegral x + 1
                y0 = fromIntegral y
                y1 = fromIntegral y + 1
                c = colorHammDist (ags!(x,y)) (env world)
drawSquares :: World -> IO ()
drawSquares world = renderPrimitive Quads $ mapM_ drawQuad P.worldCoods
    where
        ags = agents world
        drawQuad :: (Int,Int) -> IO ()
        drawQuad (x, y) = do
            currentColor $= c
            vertex $ Vertex2 x0 y0
            vertex $ Vertex2 x1 y0
            vertex $ Vertex2 x1 y1
            vertex $ Vertex2 x0 y1
            where
                x0 :: GLint
                x0 = fromIntegral x
                x1 = fromIntegral x + 1
                y0 = fromIntegral y
                y1 = fromIntegral y + 1
                c = colorHammDist (ags!(x,y)) (env world)
drawSquares world = renderPrimitive Quads $ mapM_ drawQuad P.worldCoods
    where
        ags = agents world
        drawQuad :: (Int,Int) -> IO ()
        drawQuad (x, y) = do
            currentColor $= c
            vertex $ Vertex2 x0 y0
            vertex $ Vertex2 x1 y0
            vertex $ Vertex2 x1 y1
            vertex $ Vertex2 x0 y1
            where
                x0 :: GLint
                x0 = fromIntegral x
                x1 = fromIntegral x + 1
                y0 = fromIntegral y
                y1 = fromIntegral y + 1
                c = colorHammDist (ags!(x,y)) (env world)