hsqml-demo-morris 0.3.1.1 → 0.3.2.0
raw patch · 4 files changed
+13/−59 lines, 4 filesdep ~containersdep ~directorydep ~hsqmlnew-uploader
Dependency ranges changed: containers, directory, hsqml, text
Files
- LICENSE +1/−0
- hsqml-demo-morris.cabal +10/−10
- qml/crash.qml +0/−48
- src/Morris/Board.hs +2/−1
LICENSE view
@@ -1,4 +1,5 @@ Copyright (c)2012-2016, Robin KAY+Copyright (c)2025, Sascha-Oliver Prolic All rights reserved.
hsqml-demo-morris.cabal view
@@ -1,12 +1,12 @@ Name: hsqml-demo-morris-Version: 0.3.1.1+Version: 0.3.2.0 Cabal-version: >= 1.10 Build-type: Simple License: BSD3 License-file: LICENSE-Copyright: (c) 2012-2016 Robin KAY+Copyright: (c) 2012-2016 Robin KAY, (c) 2025 Sascha-Oliver Prolic Author: Robin KAY-Maintainer: komadori@gekkou.co.uk+Maintainer: saschaprolic@googlemail.com Stability: experimental Homepage: http://www.gekkou.co.uk/software/hsqml/ Category: Graphics, Game@@ -16,7 +16,7 @@ Extra-source-files: CHANGELOG Description:- HsQML-based implementation of Nine Men's Morris+ HsQML-based implementation of Nine Men's Morris. Executable hsqml-morris Default-language: Haskell2010@@ -26,14 +26,14 @@ Morris.Board Build-depends: base == 4.*,- containers >= 0.4 && < 0.6,+ containers >= 0.4 && < 0.7, deepseq >= 1.2 && < 1.5,- directory >= 1.1 && < 1.3,- text >= 0.11 && < 1.3,+ directory >= 1.1 && < 1.4,+ text >= 2.0 && < 2.1, OddWord == 1.0.*,- hsqml >= 0.3.1 && < 0.4+ hsqml >= 0.3.6 && < 0.4 GHC-options: -threaded Source-repository head- type: darcs- location: http://hub.darcs.net/komadori/hsqml-demo-morris+ type: git+ location: http://github.com/prolic/hsqml-demo-morris
− qml/crash.qml
@@ -1,48 +0,0 @@-import QtQuick 2.0--Rectangle {- id: frame;- width: 500; height: 500;- color: 'white';-- property real t;-- SequentialAnimation on t {- id: anim;- NumberAnimation {- from: 0;- to: 1;- duration: 1000;- }- ScriptAction {- script: {- view.model = (view.model+1)%2;- anim.restart();- }- }- }-- /*Connections {- target: anim;- onRunningChanged: {- if (!anim.running) {- view.model = (view.model+1)%2;- anim.restart();- }- }- }*/-- Repeater {- id: view- model: 1;- Rectangle {- x: 450*frame.t; y: 50*index;- width: 50; height: 50;- color: 'black';- }- }-- Component.onCompleted: {- anim.start();- }-}
src/Morris/Board.hs view
@@ -8,6 +8,7 @@ import Data.List import Data.Map (Map) import qualified Data.Map as Map+import Data.Map.Strict (insertWith) import Debug.Trace import Numeric @@ -109,7 +110,7 @@ adjacencyMap = let ps = concatMap (\x@(k,v) -> [x,(v,k)]) $ concatMap (\m -> zip m (tail m)) millPositions- in foldr (\(k,v) m -> Map.insertWith' (++) k [v] m) Map.empty ps+ in foldr (\(k,v) m -> insertWith (++) k [v] m) Map.empty ps getPlayerPieces :: Player -> Board -> [Position] getPlayerPieces player board =