Fix highlight squares for flipped boards

The highlighted squares are not adjusting to flipped boards.
This PR fixes this issue

todo:
 - [x] Diagram/Board - the fix

@maddo 
Isn't this loop the same as `array_search`?