| License | MIT |
|---|---|
| Maintainer | @tylerjl |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Y2015.D21
Description
Solutions to the day 21 set of problems for adventofcode.com.
Synopsis
- battle :: Combatant -> Combatant -> (Bool, Int)
- cheapestVictory :: String -> Int
- highestLoss :: String -> Int
- toBoss :: String -> Combatant
- mkTestCombatant :: Combatant
Documentation
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.
Finds the cheapest possible victory given combatant stats.
Finds the worst possible loss given combatant stats.
Arguments
| :: String | Raw combatant stats |
| -> Combatant | Resultant combatant record |
Parses a string into a Combatant
Arguments
| :: Combatant | Low-complexity |
Utility function to generate a cheap test Combatant.