optimized get adjacent for speed

This scales to large boards a lot better now.