public static bool AabbMapIntersectionTest(this IIntersectable item, Cell[,] maze) { foreach (Cell cell in item.GetSurroundingCells(maze)) { if (item.AabbAabbIntersectionTest(cell)) { if (item.SatIntersectionTest(cell)) { return(true); } } } return(false); }