norbcodes / entities

entities2 is a small turn-based command-line combat game, which (v1.0) I wrote in 2 days.
5 stars 1 forks source link

Generation of empty moves with 0.00 energy #20

Closed norbcodes closed 2 months ago

norbcodes commented 2 months ago

What the title says.

I have no idea how this happens, why it happens, where it happens. But I guess i'll have fun fixing this one :P

Examples: image image image

norbcodes commented 2 months ago

This might actually be due to std::uniform_int_distribution including the end range value too.

(1,6) includes 1 and 6 and everything in between.

I don't know yet, gonna get to this after I sleep.