sln_2015_21
Copyright(c) Eric Mertens 2021
LicenseISC
Maintaineremertens@gmail.com
Safe HaskellNone
LanguageHaskell2010

Main

Description

https://adventofcode.com/2015/day/21

Buy an equipment loadout and see how it fairs against a boss in a battle.

Synopsis

Documentation

data Item Source #

Constructors

Item 

Instances

Instances details
Read Item Source # 
Instance details

Defined in Main

Show Item Source # 
Instance details

Defined in Main

Methods

showsPrec :: Int -> Item -> ShowS #

show :: Item -> String #

showList :: [Item] -> ShowS #

main :: IO () Source #

>>> :main
78
148

chooseUpTo :: Int -> [a] -> [[a]] Source #

fight Source #

Arguments

:: Int

hit points

-> Int

damage

-> Int

armor

-> Item 
-> Bool 

outcome :: Int -> Int -> Int -> Int -> Bool Source #