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

Y2015.D21

Description

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

Synopsis

Documentation

battle #

Arguments

:: Combatant

Player 1

-> Combatant

Player 2

-> (Bool, Int)

Tuple containing whether first player won, and ^ at what price.

Simulates the outcome of two Combatants dueling.

cheapestVictory #

Arguments

:: String

Raw combatant stats.

-> Int

Cheapest possible victory as an Int

Finds the cheapest possible victory given combatant stats.

highestLoss #

Arguments

:: String

Raw combatant stats.

-> Int

Highest possible loss as an Int

Finds the worst possible loss given combatant stats.

toBoss #

Arguments

:: String

Raw combatant stats

-> Combatant

Resultant combatant record

Parses a string into a Combatant

mkTestCombatant #

Arguments

:: Combatant

Low-complexity Combatant.

Utility function to generate a cheap test Combatant.