The 5% is throwing me off. There's no way to compute a certain live/die verdict when a probability. A singular zombie could be 2000 away and you get really unlucky and miss all shots.
Maybe you mean every 20th shot you miss? Or create an impure function that returns a different value depending on random chance from the probability? Or something else?
The 5% is throwing me off. There's no way to compute a certain live/die verdict when a probability. A singular zombie could be 2000 away and you get really unlucky and miss all shots.
Maybe you mean every 20th shot you miss? Or create an impure function that returns a different value depending on random chance from the probability? Or something else?
I believe it would mean something like that in Haskell (I'm not really confortable enough with Monad so there is room to improvements).
And I would use this on each shot. Meaning I have 5/100 chance of missing my target. That is what I understood but I may be wrong on this one.
This was the problem that I couldn't work out either - the tests become flaky and unreliable. Seems at odds with the rest of the scenario