From c8d3ad6c5683d09639c097e6cac80cfd5ec674f5 Mon Sep 17 00:00:00 2001 From: nek0 Date: Mon, 4 May 2020 05:44:58 +0200 Subject: [PATCH] add class --- src/Affection/Class.hs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/Affection/Class.hs diff --git a/src/Affection/Class.hs b/src/Affection/Class.hs new file mode 100644 index 0000000..bb09229 --- /dev/null +++ b/src/Affection/Class.hs @@ -0,0 +1,21 @@ +module Affection.Class where + +import qualified SDL + +import Affection.Types as A + +class Affectionate a where + + loadState :: IO a + + preLoop :: a -> Affection () + + handleEvents :: a -> [SDL.EventPayload] -> Affection () + + update :: a -> Double -> Affection () + + draw :: a -> Affection () + + cleanUp :: a -> IO () + + hasNextStep :: a -> Affection Bool