changed Player type to UUID

This commit is contained in:
Dennis Frieberg 2020-08-26 16:13:38 +02:00
parent e38b240178
commit 83a644e2ab
3 changed files with 5 additions and 5 deletions

View file

@ -23,6 +23,7 @@ dependencies:
- base >= 4.7 && < 5
- text
- containers
- uuid
library:
source-dirs: src

View file

@ -16,7 +16,6 @@ module Data.TickLeiste
toList,
fromList,
toMap,
fromMap,
Tick (..),
)
where
@ -24,6 +23,7 @@ where
import qualified Data.Map.Strict as M
import Data.Maybe (fromMaybe)
import qualified Data.Text as T
import qualified Data.UUID as U
-- | A Tick is just a number
data Tick = Abwarten | Bereithalten | Tick Int
@ -45,7 +45,7 @@ getTickValue (Tick n) = Just n
getTickValue _ = Nothing
-- | A Player has a name as identifier
type Player = T.Text
type Player = U.UUID
-- | The TickLeiste consists of a List of Ticks and for each Tick a
-- Queue of players, that play at that turn.
@ -122,9 +122,6 @@ fromList = error "not implemented"
toMap :: TickLeiste -> M.Map Tick [Player]
toMap = leiste
-- TODO
fromMap :: M.Map Tick [Player] -> Maybe TickLeiste
fromMap = error "not implemented"
-- these are just internal helpers

View file

@ -36,6 +36,7 @@ library
base >=4.7 && <5
, containers
, text
, uuid
default-language: Haskell2010
test-suite tickLeiste-test
@ -51,4 +52,5 @@ test-suite tickLeiste-test
, containers
, text
, tickLeiste
, uuid
default-language: Haskell2010