packages feed

ansi-terminal-game 0.6.1.0 → 0.7.0.0

raw patch · 4 files changed

+24/−9 lines, 4 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- Terminal.Game: AlwaysLoop :: Loop
- Terminal.Game: Elapse :: ExpBehaviour
- Terminal.Game: Reach :: ExpBehaviour
- Terminal.Game: Times :: Integer -> ExpBehaviour -> Loop
- Terminal.Game: data ExpBehaviour
- Terminal.Game: data Loop
+ Terminal.Game: creaLoopAnimation :: Loop -> [(Integer, Plane)] -> Animation
+ Terminal.Game: creaStaticAnimation :: Plane -> Animation

Files

ansi-terminal-game.cabal view
@@ -1,5 +1,5 @@ name:                ansi-terminal-game-version:             0.6.1.0+version:             0.7.0.0 synopsis:            sdl-like functions for terminal applications, based on                      ansi-terminal description:         Library which aims to replicate standard 2d game
changes.txt view
@@ -1,8 +1,15 @@+0.7.0.0+-------++- Simplified Animation interface (breaking changes).+- Added `creaLoopAnimation` and `creaStaticAnimation`.+- Released Fri 22 Nov 2019 14:40:44 CET+ 0.6.1.0 ------- -- Reworked Timers/Animations interface and documentation-- Added `lapse` (for Timers/Animations)+- Reworked Timers/Animations interface and documentation.+- Added `lapse` (for Timers/Animations). - Released Fri 22 Nov 2019 01:03:37 CET  0.6.0.1
src/Terminal/Game.hs view
@@ -37,19 +37,20 @@                        -- parametrised over any state @s@, you are free                        -- to implement game logic as you prefer. -                       -- ** Timers+                       -- ** Timers/Animation++                       -- *** Timers                        Timed,                        creaTimer, creaBoolTimer,                        creaTimerLoop, creaBoolTimerLoop, -                       -- ** Animations+                       -- *** Animations                        Animation,-                       -- xxx elimina animation?-                       -- xxx o di certo Loop e ExpBehaviour-                       Loop(..), ExpBehaviour(..),                        creaAnimation,+                       creaLoopAnimation,+                       creaStaticAnimation, -                       -- ** Timers/Animations interface+                       -- *** T/A interface                        tick, ticks, reset, lapse,                        fetchFrame, isExpired, getFrames, 
src/Terminal/Game/Animation.hs view
@@ -28,6 +28,13 @@ creaAnimation :: Loop -> [(Integer, Plane)] -> Animation creaAnimation = creaTimedRes +-- | Creates a looped 'Animation'.+creaLoopAnimation :: Loop -> [(Integer, Plane)] -> Animation+creaLoopAnimation = creaTimedRes++-- | Wraps a 'Plane' into an 'Animation'.+creaStaticAnimation :: Plane -> Animation+creaStaticAnimation p = creaTimedRes (Times 1 Elapse) [(1, p)]  ------------------- -- SERIALISATION --