License | MIT |
---|---|
Maintainer | @tylerjl |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
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
:: Combatant | Player 1 |
-> Combatant | Player 2 |
-> (Bool, Int) | Tuple containing whether first player won, and ^ at what price. |
Simulates the outcome of two Combatant
s dueling.
Finds the cheapest possible victory given combatant stats.
Finds the worst possible loss given combatant stats.
:: String | Raw combatant stats |
-> Combatant | Resultant combatant record |
Parses a string into a Combatant
:: Combatant | Low-complexity |
Utility function to generate a cheap test Combatant
.