Commit c6ab9323 authored by Jayke Meijer's avatar Jayke Meijer

Modified Point init to accept a tuple of coordinates as well, for easy...

Modified Point init to accept a tuple of coordinates as well, for easy testing. Should be backwards compatible.
parent 5cced020
class Point: class Point:
def __init__(self, corner): def __init__(self, corner = None, coordinates = None):
self.x = corner.getAttribute("x") if corner != None:
self.y = corner.getAttribute("y") self.x = corner.getAttribute("x")
\ No newline at end of file self.y = corner.getAttribute("y")
elif coordinates != None:
self.x = coordinates[0]
self.y = coordinates[1]
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment