adventofcode-0.1.0.0: Haskell solutions to adventofcode
LicenseMIT
Maintainer@tylerjl
Safe HaskellSafe-Inferred
LanguageHaskell2010

Y2015.D22

Description

Solutions to the day 22 set of problems for adventofcode.com.

Synopsis

Documentation

data Result #

Represents the final result of a sequence of player moves.

Constructors

Won Int

Indicates a player win with the total mana spent.

Lost

Player loss.

Instances

Instances details
Show Result # 
Instance details

Defined in Y2015.D22

Eq Result # 
Instance details

Defined in Y2015.D22

Ord Result # 
Instance details

Defined in Y2015.D22

spellBattle #

Arguments

:: Bool

Whether to run the game in "hard mode"

-> String

Boss stats input string

-> Result

Best possible battle outcome

Finds the minimum required mana to win a game.

testSpellBattle #

Arguments

:: Bool

Whether to run the game in "hard mode"

-> String

Boss stats input string

-> Result

Best possible battle outcome

Provided as a quicker method for testing shorter player battles.