 public class AbstractShapeView: UIView
 {
 	// MARK: - Private properties
+	private var needsShapeCreation = true
 	private var shapeArray: [AbstractShape] = []
 
 	// MARK: - Public properties

		return UIColor(red: CGFloat(arc4random_uniform(1000)) / 1000.0, green: CGFloat(arc4random_uniform(1000)) / 1000.0, blue: CGFloat(arc4random_uniform(1000)) / 1000.0, alpha: 1.0)
	}

	// MARK: - Drawing methodss
	public override func drawRect(rect: CGRect)
	{
		super.drawRect(rect)

		guard let context = UIGraphicsGetCurrentContext() else { return }
		for shape in shapeArray
		{
			let minDimension = min(bounds.size.width, bounds.size.height)
			var shapeRect = CGRect(x: shape.relativeFrame.minX * bounds.size.width, y: shape.relativeFrame.minY * bounds.size.height, width: shape.relativeFrame.size.width * minDimension, height: shape.relativeFrame.size.height * minDimension)
			shapeRect.size.width = min(max(shapeRect.size.width, minShapeSize), maxShapeSize)
			shapeRect.size.height = min(max(shapeRect.size.height, minShapeSize), maxShapeSize)
			shape.drawInContext(context, forRect: shapeRect)
		}
	}

		{
			let randomIndex = Int(arc4random_uniform(UInt32(shapeInitializers.count)))
			let shapeInitializer = shapeInitializers[randomIndex]

			let shape = shapeInitializer(relativeFrame: randomRelativeFrame(), color: randomColor())
			shapeArray.append(shape)
		}

		needsShapeCreation = false
	}
	
	private func randomRelativeFrame() -> CGRect
