refactor potential field calculation for enemies