Example #1
0
    def ifStatement(self, u, v, w, distances, previous):
        data13 = ExtraData(self.equalDistID,
                           "distance[{}] = {} + {}".format(v, distances[u], w))
        data13.addToUpdateDataQueue(self.distanceId,
                                    distances,
                                    isShownOnScreen=False,
                                    inlineExp="Distance")

        data14 = ExtraData(self.equalPrevID, "previous[{}] = {}".format(v, u))
        data14.addToUpdateDataQueue(self.prevId,
                                    previous,
                                    isShownOnScreen=False,
                                    inlineExp="Previous")

        self.animationEngine.addToFrames(15, data=data13)
        self.animationEngine.addToFrames(16, data=data14)
Example #2
0
 def ret(self, dist, prev):
     self.animationEngine.addToFrames(24)
     self.animationEngine.addToFrames(25)
     data = ExtraData(self.distanceId,
                      dist,
                      isShownOnScreen=False,
                      inlineExp="Distance")
     data.addToUpdateDataQueue(self.prevId,
                               prev,
                               isShownOnScreen=False,
                               inlineExp="Previous")
     data.addToUpdateDataQueue(self.retID,
                               "Dist {}, OI OI OI Prev {}".format(
                                   dist, prev),
                               isShownOnScreen=False)
     self.animationEngine.addToFrames(26, data=data)