Do I need to assign new random to youHit?


Hello everyone.

I was surprised to read that I have to assign a new random to youHit variable. Why should I do it if that variable had already assigned value and nothing in the code change that? Or at least I can't see where something is changing it. I would be very grateful for explanation.

Replace this line with your code.


youHit gives you a 50% to hit, so after the first hit, you again want to determine if the user hits successful or not (another 50% change)


Even after your answer it took a while to get it, but finally I got it. Without second assingment I would always have a hit or always a miss. Thanks a lot!


exactly, you understand :slight_smile: