What are "Attempts Remaining" in the code hacking minigame?

When I'm in the code hacking minigame, I always see "3 attempts remaining" at the bottom of the screen. I'm not sure how this is used though.

hacking minigame

In my experience, if I run my cursor into a red section, it removes one piece I've already hacked. If I do that when I don't have any pieces hacked, I get locked out of the system, and can't attempt a hack again. So where does the 3 attempts remaining come in?


Solution 1:

It's been a long time since I played Mass Effect 2, but what happens if you pick a non-red square that doesn't match the target? I think it lowers attempts remaining, but I'm not positive on that.