diff --git a/src/lattice.py b/src/lattice.py index 4a15892..fbe5bb7 100644 --- a/src/lattice.py +++ b/src/lattice.py @@ -24,18 +24,18 @@ class Lattice(): specs=spec.split(":") # check type of lattice if specs[0]=="square": - return Square_lattice.new_square(specs[1:],spec) + return Lattice_square.new_square(specs[1:],spec) else: return(None,"error: unrecognized lattice type: '"+specs[0]+"'") # square lattice -class Square_lattice(Lattice): +class Lattice_square(Lattice): def __init__(self,**kwargs): self.spacing=kwargs.get("spacing",1.) - super(Square_lattice,self).__init__(**kwargs,type="square") + super(Lattice_square,self).__init__(**kwargs,type="square") # lattice point nearest to point def nearest(self,point): @@ -49,12 +49,12 @@ class Square_lattice(Lattice): def new_square(specs,spec): # no optional args if len(specs)==0: - return (Square_lattice(),"") + return (Lattice_square(),"") if len(specs)>1: return (None,"error: '"+spec+"' is not a valid specification for the square lattice: should be 'square[:spacing]'") try: spacing=float(specs[0]) - return (Square_lattice(spacing=spacing),"") + return (Lattice_square(spacing=spacing),"") except: return (None,"error: '"+spec+"' is not a valid specification for the square lattice: should be 'square[:spacing]'") diff --git a/src/painter.py b/src/painter.py index 9055b9a..f11cfe8 100644 --- a/src/painter.py +++ b/src/painter.py @@ -7,7 +7,6 @@ from kivy.graphics import Color,Line from point import Point from polyomino import Cross from polyomino import Square_element -from lattice import Square_lattice from tools import remove_fromlist