Fixed the bugged code. Now properly removing friendly pieces from the positions vector