def create_bone_on_canvas(self, i, canvas): a = random.randint(90, 510) b = random.randint(90, 510) angle = random.randint(0, 360) value = random.randint(1, 6) dice = Dice(a, b, angle) dice.draw(canvas, value) self.value_list[i] = value