Hi, I have developed a memotest in Elm 0.17.
My Model is the following:
type alias Model = List IndexedCard
type alias IndexedCard = { id : Int, model : Card.Model }
where Card.Model is a module where I modeled a single card.
So now the game is working but the cards of the memotest always appear in
the same order.
I initialize each card:
card1 = IndexedCard 1 (Card.init "images/blastoise.jpg")
card2 = IndexedCard 2 (Card.init "images/charmeleon.jpg")
card3 = IndexedCard 3 (Card.init "images/raichu.jpg")
card4 = IndexedCard 4 (Card.init "images/diglett.jpg")
card5 = IndexedCard 5 (Card.init "images/venusaur.jpg")
card6 = IndexedCard 6 (Card.init "images/mewto.jpg")
and then cards = [card1, card2, card3, card4, card5, card6]
So i pass this to the init in the App.program.
My question is, how do I create this list random so that the cards appear
in different order each time?
Thanks
--
You received this message because you are subscribed to the Google Groups "Elm
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.