def get_action( self, e, times=1 ):

        w,h= director.get_window_size()
        center = (w/2.0, (ROWS * SQUARE_SIZE) / 2.0  )

        # basic actions
        if e == Colors.ROTATE:
            a = RotateBy( 360 * times, duration=self.duration * times)
        elif e == Colors.SCALE:
            a = ScaleTo( 0.5, duration=self.duration/2.0) + ScaleTo(1, duration=self.duration/2.0) 
            a *= times

        # Grid actions
        elif e == Colors.LIQUID:
            a = Liquid( grid=self.grid_size, waves=self.duration*times // 2, duration=self.duration * times) + StopGrid()
        elif e == Colors.WAVES:
            a = Waves( grid=self.grid_size, waves=self.duration*times // 2, duration=self.duration * times) + StopGrid()
        elif e == Colors.TWIRL:
            a = Twirl( grid=self.grid_size, center=center, twirls=self.duration*times // 2, duration=self.duration * times ) + StopGrid()
        elif e == Colors.LENS:
            w,h = director.get_window_size()
            a = Lens3D( radius=h//2, grid=self.grid_size, duration=self.duration * times) + StopGrid()
        else:
            raise Exception("Effect not implemented: %s" % str(e) )
        return a
returns the actions for a specific effects
dataset/ETHPy150Open los-cocos/cocos/samples/tetrico/gameview.py/GameView.get_action