I’ve passed every test case on the IDE but the LOOP validator keeps failing and i have no idea why,
to find a loop case i store the current state of bender(coordinates,direction,breaker,inverted) in an array.
at the start of the next coordinate it checks if the current state already exists, signaling a loop, also, every time an ‘X’ block is destroyed the array is cleared
the game loop is a while that breaks when it encounters the ‘$’ character, if it doesn’t find it before bender repeats a state, it prints ‘LOOP’
i’m using python