packages feed

betris 0.1.0.0 → 0.1.0.1

raw patch · 3 files changed

+22/−17 lines, 3 filesnew-component:exe:betrisPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

README.md view
@@ -1,4 +1,4 @@ # betris -A vertical version of tetris for braille display users.+A horizontal version of tetris for braille display users. 
app/Main.hs view
@@ -4,6 +4,7 @@ module Main where  import Control.Concurrent (forkIO, threadDelay)+import Control.Concurrent.STM.TVar import Control.Concurrent.STM.TBChan import Control.Lens import Control.Monad (forever)@@ -23,13 +24,16 @@   vty <- mkVty defaultConfig   chan <- atomically $ newTBChan 10   game <- initGame 0+  speed <- newTVarIO 1000000    forkIO $ forever $ do     e <- nextEvent vty     atomically $ writeTBChan chan $ Ev e    forkIO $ forever $ do-    threadDelay 1000000+    delay <- readTVarIO speed+    atomically $ modifyTVar speed ((-) 100)+    threadDelay delay     atomically $ writeTBChan chan Tick    consume vty chan game@@ -51,8 +55,10 @@  gstr :: Game -> String gstr g = map go [1, 3 .. boardHeight] where-  go y = chr $ foldr (f' y) 0x2800 [((0,0), 1), ((1,0), 2), ((2,0), 4), ((0,1), 8), ((1,1),16), ((2,1),32), ((3,0),64),((3,1),128)]-  f' y ((x',y'), v) a = case Map.lookup (V2 (x+x') (y+y')) fullBoard of+  go y = chr $ foldr (f y) 0x2800 [((0,0),1), ((1,0), 2), ((2,0), 4)+                                  ,((0,1),8), ((1,1),16), ((2,1),32)+                                  ,((3,0),64),((3,1),128)]+  f y ((x',y'), v) a = case Map.lookup (V2 (x+x') (y+y')) fullBoard of     Just _ -> a + v     _ -> a   x = minimum $ (boardWidth - 3) : map (\(V2 x _) -> x) (coords $ g ^. block)
betris.cabal view
@@ -1,13 +1,13 @@--- This file has been generated from package.yaml by hpack version 0.20.0.+-- This file has been generated from package.yaml by hpack version 0.28.2. -- -- see: https://github.com/sol/hpack ----- hash: f9ba6b4b5ef2e7b1d45d1ccacf5b650ca1fe2cfb20437e37390d9582602a661a+-- hash: af2ba80b35c973a4cc0a173694bdba4ac17263923f169624815228e5ce572086  name:           betris-version:        0.1.0.0-synopsis:       Braille friendly vertical version of tetris-description:    Please see the README on Github at <https://github.com/mlang/betris#readme>+version:        0.1.0.1+synopsis:       Braille friendly horizontal version of tetris+description:    Please see the README at <https://github.com/mlang/betris#readme> category:       Game homepage:       https://github.com/mlang/betris#readme bug-reports:    https://github.com/mlang/betris/issues@@ -18,7 +18,6 @@ license-file:   LICENSE build-type:     Simple cabal-version:  >= 1.10- extra-source-files:     README.md @@ -27,6 +26,10 @@   location: https://github.com/mlang/betris  library+  exposed-modules:+      Game.Tetris+  other-modules:+      Paths_betris   hs-source-dirs:       src   build-depends:@@ -38,14 +41,12 @@     , stm     , stm-chans     , vty-  exposed-modules:-      Game.Tetris-  other-modules:-      Paths_betris   default-language: Haskell2010 -executable betris-exe+executable betris   main-is: Main.hs+  other-modules:+      Paths_betris   hs-source-dirs:       app   ghc-options: -threaded -rtsopts -with-rtsopts=-N@@ -59,6 +60,4 @@     , stm     , stm-chans     , vty-  other-modules:-      Paths_betris   default-language: Haskell2010