Skip to content

Instantly share code, notes, and snippets.

@Profpatsch
Last active August 29, 2015 14:01
Show Gist options
  • Save Profpatsch/ea67290f3c734c199b17 to your computer and use it in GitHub Desktop.
Save Profpatsch/ea67290f3c734c199b17 to your computer and use it in GitHub Desktop.
class Pattern:
_points = set()
def _init__(self, points):
self._points = points
class Circle(Pattern):
def __init__(self, r):
ps = set()
# compute every point for that radius
# ………
self._points = ps
def combine(pattern1, pattern2):
return Pattern(pattern1.union(pattern2))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment