Keeping a minimum value of an array up to date?

Hey everyone!

So i'm currently working on a little project where i have an array of 5 barriers, and one player object. The aim of it is that when you run the program, the player object will move to the closest barrier. When it reaches it, it disappears by setting the colour to (0.1, 0.1, 0.1). It is then supposed to move to the next nearest barrier not including the one that just disappeared and make that one disappear. It keeps doing this until all 5 barriers have disappears. There are many classes so i'll just paste the current code that i'm working on to see if anyone can understand where i'm going wrong (you wont be able to run it). I'm a beginner so I understand the code is probably horrible and messy but any advice would be greatly appreciated :)

I'm trying to set boolean values to determine what has been eaten but i can't get it to move past the first barrier. (it moves to the first closest one successfully and makes it disappear but it then stops at that barrier). Included image is what it looks like so you understand. The player object (the one that moves) is the white one.