public void GetTouchingShapesOfLayoutType(List <GameShape> ListToPopulate, EShapeLayoutType layoutType) { for (int index = 0; index < this.OccupiedSlots.Count; ++index) { this.OccupiedSlots[index].GetNeighborShapes(ListToPopulate); } for (int index = ListToPopulate.Count - 1; index >= 0; --index) { if (ListToPopulate[index].ShapeLayoutType != layoutType) { ListToPopulate.RemoveAt(index); } } }
protected GameShape(EShapeLayoutType layoutType, ShapeLayoutBase layoutContainer) { this.ShapeLayoutType = layoutType; this.ShapeLayoutContainer = layoutContainer; }