def parse_updates(self):
        b = self.buffer
        current_time = time.time()
        while True:
            id = b.read_int()

            if id == 0:
                break

            x = b.read_short()
            y = b.read_short()
            size = b.read_short()

            red = b.read_byte()
            green = b.read_byte()
            blue = b.read_byte()

            color = (red, green, blue)

            byte = b.read_byte()

            virus = (byte & 1)
            agitated = (byte & 16)  # what is this?

            # skipping bytes, no idea what the purpose is
            if (byte & 2):
                b.skip(4)
            elif (byte & 4):
                b.skip(8)
            elif (byte & 8):
                b.skip(16)

            # read name
            name = b.read_string()
            
            # if cell is not known globally:
            #   create global instance
            # if cell in self.ids:
            #   set owner to self

            # check if this cell is known globally
            if self.game.has_cell(id):
                # known globally

                # update global cell
                cell = self.game.get_cell(id)
                #print(str(current_time - cell.last_update))

                t = current_time - cell.last_update

                if (t > 0.0):

                  vx = t/(float(x) - float(cell.x))
                  vy = (float(y) - float(cell.y))/t

                  cell.vx = (vx + cell.vx)/2.0
                  cell.vy = (vy + cell.vy)/2.0

                  v = math.sqrt(cell.vx*cell.vx + cell.vy*cell.vy)
                  max_velocity = 800

                  if v > max_velocity:
                    cell.vx *= (max_velocity/v)
                    cell.vy *= (max_velocity/v)
                    cell.x = x
                    cell.y = y
                  else:
                    cell.x += cell.vx*t
                    cell.y += cell.vy*t

                  cell.interpolated_x = cell.x
                  cell.interpolated_y = cell.y
                  cell.last_update = current_time
                
                cell.size = size
                cell.color = color
                cell.virus = virus
                cell.agitated = agitated
                cell.timestamp = self.game.timestamp
            else:
                # not known globally
                
                # create new global cell
                cell = Cell(id, x, y, size, color, virus, agitated, name)
                cell.watchers.append(self)
                cell.timestamp = self.game.timestamp

                # set owner if it is ours
                if self.has_id(id):
                    cell.owner = self
                
                # add cell to global cells
                self.game.add_cell(cell)
    
    # version 520
dataset/ETHPy150Open Raeon/pygar/bot.py/Bot.parse_updates/swapped operands of `/`