packages feed

aztecs-hierarchy 0.1.0.0 → 0.2.0.0

raw patch · 3 files changed

+21/−19 lines, 3 filesdep ~aztecsdep ~basedep ~containersPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: aztecs, base, containers

API changes (from Hackage documentation)

Files

aztecs-hierarchy.cabal view
@@ -1,18 +1,22 @@ cabal-version: 2.4 name:          aztecs-hierarchy-version:       0.1.0.0+version:       0.2.0.0 license:       BSD-3-Clause license-file:  LICENSE maintainer:    matt@hunzinger.me author:        Matt Hunzinger-synopsis:      A type-safe and friendly Entity-Component-System (ECS) for Haskell-description:   The Entity-Component-System (ECS) pattern is commonly used in video game develop to represent world objects.-               .-               ECS follows the principal of composition over inheritence. Each type of-               object (e.g. sword, monster, etc), in the game has a unique EntityId. Each-               entity has various Components associated with it (material, weight, damage, etc).-               Systems act on entities which have the required Components. homepage:      https://github.com/matthunz/aztecs+synopsis:+    A type-safe and friendly Entity-Component-System (ECS) for Haskell++description:+    The Entity-Component-System (ECS) pattern is commonly used in video game develop to represent world objects.+    .+    ECS follows the principal of composition over inheritence. Each type of+    object (e.g. sword, monster, etc), in the game has a unique EntityId. Each+    entity has various Components associated with it (material, weight, damage, etc).+    Systems act on entities which have the required Components.+ category:      Game Engine  source-repository head@@ -20,17 +24,16 @@     location: https://github.com/matthunz/aztecs.git  library-    exposed-modules:-        Data.Aztecs.Hierarchy+    exposed-modules:  Data.Aztecs.Hierarchy     hs-source-dirs:   src     default-language: Haskell2010     ghc-options:      -Wall     build-depends:-        base >=4 && <5,-        aztecs >= 0.3,-        containers >=0.7,+        base >=4.6 && <5,+        aztecs >=0.5,+        containers >=0.6,         mtl >=2,-        linear >= 1+        linear >=1  test-suite aztecs-hierarchy-test     type:             exitcode-stdio-1.0@@ -39,9 +42,9 @@     default-language: Haskell2010     ghc-options:      -Wall     build-depends:-        base >=4 && <5,+        base >=4.6 && <5,         aztecs,         aztecs-hierarchy,-        containers >=0.7,+        containers >=0.6,         hspec >=2,         QuickCheck >=2
src/Data/Aztecs/Hierarchy.hs view
@@ -93,7 +93,7 @@                   then do                     A.insert entity $ ChildState children                     let added = Set.difference children childState-                        removed = Set.difference childState children+                    -- TODO removed = Set.difference childState children                     mapM_ (\e -> A.insert e . Parent $ entity) added                   else return ()               Nothing -> do
test/Main.hs view
@@ -7,7 +7,6 @@ import Data.Aztecs.Hierarchy (Children (..), Parent (..)) import qualified Data.Aztecs.Hierarchy as Hierarchy import qualified Data.Aztecs.Query as Q-import Data.Aztecs.System (runSystemWithWorld) import qualified Data.Aztecs.World as W import Data.Functor.Identity (Identity (..)) import qualified Data.Set as Set@@ -23,6 +22,6 @@ prop_addParents = do   let (_, w) = W.spawnEmpty W.empty       (e, w') = W.spawn (bundle . Children $ Set.singleton e) w-  w'' <- runSystemWithWorld Hierarchy.update w'+  (_, w'') <- runSchedule (schedule Hierarchy.update) w' ()   let (res, _) = runIdentity $ Q.all Q.fetch w''   res `shouldMatchList` [Parent e]