checkCollisionV (r:rs) origY p@(Player _ (dx,dy) a i)
    | r `collides` (y .~ origY $ p^.bounding) = if r^.y - origY < 0
        then if (p^.bounding.y+p^.velocity._2) < (r^.y)+(r^.height)+1 then ((bounding.y .~ (r^.y + r^.height + 1)) . (velocity._2 .~ 2) $ p, False) else (p,False)
        else if (p^.bounding.y+p^.velocity._2) > (r^.y)-(r^.height)-1 then ((bounding.y .~ (r^.y - p^.bounding.height - 1)) . (velocity._2 .~ 2) $ p, True) else (p,False)
    | p^.velocity._2 == 0 = (p, False)
    | p^.velocity._2 > 0 = if r `collides` ((y .~ origY) . (height .~ ((p^.bounding.y) - origY + (p^.bounding.height))) $ p^.bounding)
        then ((bounding.y .~ r^.y - p^.bounding.height - 1) . (velocity._2 .~ 2) $ p, True)
        else checkCollisionV rs origY p
    | otherwise = if r `collides` (height .~ (origY - (p^.bounding.y)) $ p^.bounding)
        then ((bounding.y .~ r^.y + r^.height + 1) . (velocity._2 .~ 2) $ p, False)
        else checkCollisionV rs origY p
checkCollisionV (r:rs) origY p@(Player _ (dx,dy) a i)
    | r `collides` (y .~ origY $ p^.bounding) = if r^.y - origY < 0
        then if (p^.bounding.y+p^.velocity._2) < (r^.y)+(r^.height)+1 then ((bounding.y .~ (r^.y + r^.height + 1)) . (velocity._2 .~ 2) $ p, False) else (p,False)
        else if (p^.bounding.y+p^.velocity._2) > (r^.y)-(r^.height)-1 then ((bounding.y .~ (r^.y - p^.bounding.height - 1)) . (velocity._2 .~ 2) $ p, True) else (p,False)
    | p^.velocity._2 == 0 = (p, False)
    | p^.velocity._2 > 0 = if r `collides` ((y .~ origY) . (height .~ ((p^.bounding.y) - origY + (p^.bounding.height))) $ p^.bounding)
        then ((bounding.y .~ r^.y - p^.bounding.height - 1) . (velocity._2 .~ 2) $ p, True)
        else checkCollisionV rs origY p
    | otherwise = if r `collides` (height .~ (origY - (p^.bounding.y)) $ p^.bounding)
        then ((bounding.y .~ r^.y + r^.height + 1) . (velocity._2 .~ 2) $ p, False)
        else checkCollisionV rs origY p
checkCollisionV (r:rs) origY p@(Player _ (dx,dy) a i)
    | r `collides` (y .~ origY $ p^.bounding) = if r^.y - origY < 0
        then if (p^.bounding.y+p^.velocity._2) < (r^.y)+(r^.height)+1 then ((bounding.y .~ (r^.y + r^.height + 1)) . (velocity._2 .~ 2) $ p, False) else (p,False)
        else if (p^.bounding.y+p^.velocity._2) > (r^.y)-(r^.height)-1 then ((bounding.y .~ (r^.y - p^.bounding.height - 1)) . (velocity._2 .~ 2) $ p, True) else (p,False)
    | p^.velocity._2 == 0 = (p, False)
    | p^.velocity._2 > 0 = if r `collides` ((y .~ origY) . (height .~ ((p^.bounding.y) - origY + (p^.bounding.height))) $ p^.bounding)
        then ((bounding.y .~ r^.y - p^.bounding.height - 1) . (velocity._2 .~ 2) $ p, True)
        else checkCollisionV rs origY p
    | otherwise = if r `collides` (height .~ (origY - (p^.bounding.y)) $ p^.bounding)
        then ((bounding.y .~ r^.y + r^.height + 1) . (velocity._2 .~ 2) $ p, False)
        else checkCollisionV rs origY p