コード例 #1
0
    def next_scene(self, i):
        if i % 2 == 0:
            sceneFactory = Yellow()
        else:
            sceneFactory = Cyan()

        return sceneFactory.scene()
コード例 #2
0
    def next_scene(self, i):
        if i % 3 == 0:
            sceneFactory = Yellow()
        elif i % 3 == 1:
            sceneFactory = Cyan()
        else:
            sceneFactory = Purple()

        return sceneFactory.scene()