made the mex getAllValid check neighbors for enemies before proceeding (hopefully this didnt introduce any bugs!!!)