Copyright | (c) Eric Mertens 2021 |
---|---|
License | ISC |
Maintainer | emertens@gmail.com |
Safe Haskell | None |
Language | Haskell2010 |
Documentation
:: Int | turn counter |
-> Int | player 1 location |
-> Int | player 2 location |
-> Int | player 1 score |
-> Int | player 2 score |
-> Int | player 2 score * 3 * turns |
Compute the die rolls * losing score
once one player
wins with 1000 points.
:: Int | player 1 location |
-> Int | player 2 location |
-> Int | player 1 score |
-> Int | player 2 score |
-> Paths Bool | player 1 won |
Compute the possible ways a the players can win while playing with a 3-sided dice given some starting conditions.
threeRolls :: Paths Int Source #
Sum of 3d3.
Counting Nondeterminism Computations
Nondeterministic computation that can consolidate paths returning the same value.
gather :: Ord a => Paths a -> Paths a Source #
Combine the counts of equal outputs to reduce braching factor.