Permalink
Browse files

n/a: rename domino set functions

  • Loading branch information...
1 parent dce11f8 commit 8d8def9a333318f52271dbf9497d52edbbe90c46 @rizsotto committed Nov 17, 2011
Showing with 5 additions and 6 deletions.
  1. +1 −1 src/Domina/Game.hs
  2. +4 −5 src/Domina/Set.hs
View
@@ -14,7 +14,7 @@ data Game = G [Hand] Line Stock
setUpGame :: [Player] -> IO Game
setUpGame ps = do
- stock <- shuffle $ generateDominoSet 6
+ stock <- shuffle $ generate 6
(stock', hands) <- return $ everybodyDrawSevenFromStock ps stock
return $ G hands [] stock'
View
@@ -1,6 +1,6 @@
-- Copyright 2011 by Laszlo Nagy [see file COPYRIGHT]
module Domina.Set
- ( generateDominoSet
+ ( generate
, shuffle
) where
@@ -11,11 +11,10 @@ import Control.Monad
import Control.Monad.ST
import Data.STRef
-generateDominoSet :: Int -> [Domino]
-generateDominoSet max =
- [(a, b) | a <- [0..max], b <- [0..a]]
+generate :: Int -> Stock
+generate max = [(a, b) | a <- [0..max], b <- [0..a]]
-shuffle :: [Domino] -> IO [Domino]
+shuffle :: Stock -> IO Stock
shuffle ds = getStdRandom (shuffle' ds)
-- this code from http://www.haskell.org/haskellwiki/Random_shuffle ..:: begin

0 comments on commit 8d8def9

Please sign in to comment.