12 lines
277 B
Haskell
12 lines
277 B
Haskell
--{-# LANGUAGE LambdaCase #-}
|
|
|
|
module Dodge.Distortion (updateDistortion) where
|
|
|
|
import Dodge.Data.Distortion
|
|
import Control.Lens
|
|
|
|
updateDistortion :: Distortion -> Maybe Distortion
|
|
updateDistortion rd
|
|
| rd ^. rdTime > 0 = Just $ rd & rdTime -~ 1
|
|
| otherwise = Nothing
|