void GenerateGrid( ) { if (grid == null) { grid = GridFactory.GenerateOuterUShape(gridSize, dir); //grid = GridFactory.GenerateInnerUShape (gridSize, dir); } }