def draw(self): #set the color and then draw the character that represents this object at its position lib.console_set_default_foreground(con, self.color) lib.console_put_char(con, self.x, self.y, self.char, lib.BKGND_NONE)

What is the actual exception? Is it an IndexError? If so, add a print line in the create_v_tunnel function to find out exactly what the values of x and y are when the program crashes. I unfortunately don't have access to an interpreter right now so I can't really test anything.