# File tile.rb, line 10 def initialize(x1=0,y1=0,x2=1,y2=1,inclusive=true,id=nil) #id parameter is for use by saveload ONLY!!!! @x1,@y1,@x2,@y2=x1,y1,x2,y2 #begin # @x1+=0;@y1+=0;@x2+=0;@y2+=0 #check if coordinate is actually a proc (damn dynamic typing...) #rescue # raise "Bad coord: ID#{@@tiles.size+1}" #end @inclusive=inclusive #@name=name if id==nil @id=@@tiles.size #volatile, id overwritten by derived classes @tileno=@id #secure copy of id @@tiles << self else @id=id @tileno=id @@tiles[id]=self end end