Karl Semich 0xloem at gmail.com
Fri Jun 17 12:13:03 PDT 2022

structure generator that reuses spots

def StructureGenerator
  def __init__(self):
    self.generated = []
  def update(self, time):
    num_generated = 0
    num_to_generate = 1
    for idx, structure in enumerate(self.generated):
      if structure is None or not structure.update(time):
        if num_generated < num_to_generate:
          self.generated[idx] = self.new_structure()
          self.generated[idx] = None
    while num_generated < num_to_generate:
  def new_structure(self): # override
    return self.Structure()

More information about the cypherpunks mailing list