updateS :: KeyboardState -> [Shape] -> [P.Platform] -> State Player ()
updateS kS rects mp = do
    x <- use $ bounding.x
    y <- use $ bounding.y
    velocity._1 %= (\dx -> if strafe == 0 then ((if dx > 0 then floor else ceiling) $ ((fromIntegral dx)*0.9)) else (if dx*strafe > 0 then max (min (dx+strafe) 5) (-5) else strafe))
    modify moveV
    curP <- get
    let (nP,oG) = (moveObjs mp) . (checkCollisionV rects y) $ curP
    put $ (checkCollisionH rects x) . moveH $ nP
    if oG && (isPressed kS SDLK_UP) then velocity._2 %= (\dy -> (min 0 dy) - 10 ) else return ()
    where
        strafe = (if isDown kS SDLK_LEFT then -1 else 0) + (if isDown kS SDLK_RIGHT then 1 else 0)
updateS :: KeyboardState -> [Shape] -> [P.Platform] -> State Player ()
updateS kS rects mp = do
    x <- use $ bounding.x
    y <- use $ bounding.y
    velocity._1 %= (\dx -> if strafe == 0 then ((if dx > 0 then floor else ceiling) $ ((fromIntegral dx)*0.9)) else (if dx*strafe > 0 then max (min (dx+strafe) 5) (-5) else strafe))
    modify moveV
    curP <- get
    let (nP,oG) = (moveObjs mp) . (checkCollisionV rects y) $ curP
    put $ (checkCollisionH rects x) . moveH $ nP
    if oG && (isPressed kS SDLK_UP) then velocity._2 %= (\dy -> (min 0 dy) - 10 ) else return ()
    where
        strafe = (if isDown kS SDLK_LEFT then -1 else 0) + (if isDown kS SDLK_RIGHT then 1 else 0)
updateS kS rects mp = do
    x <- use $ bounding.x
    y <- use $ bounding.y
    velocity._1 %= (\dx -> if strafe == 0 then ((if dx > 0 then floor else ceiling) $ ((fromIntegral dx)*0.9)) else (if dx*strafe > 0 then max (min (dx+strafe) 5) (-5) else strafe))
    modify moveV
    curP <- get
    let (nP,oG) = (moveObjs mp) . (checkCollisionV rects y) $ curP
    put $ (checkCollisionH rects x) . moveH $ nP
    if oG && (isPressed kS SDLK_UP) then velocity._2 %= (\dy -> (min 0 dy) - 10 ) else return ()
    where
        strafe = (if isDown kS SDLK_LEFT then -1 else 0) + (if isDown kS SDLK_RIGHT then 1 else 0)