Code Duplication    Length = 15-15 lines in 2 locations

examples/samples_py.py 2 locations

@@ 1042-1056 (lines=15) @@
1039
            # render circle.png with normal blitting
1040
            self.circle.blit_rect(sample_console,
1041
                                  0, 3, -1, -1, libtcod.BKGND_SET)
1042
            self.circle.blit_rect(sample_console,
1043
                                  15, 3, -1, -1, libtcod.BKGND_SET)
1044
            self.circle.blit_rect(sample_console,
1045
                                  30, 3, -1, -1, libtcod.BKGND_SET)
1046
        self.img.blit(sample_console, x, y,
1047
                      libtcod.BKGND_SET, scalex, scaley, angle)
1048
1049
#############################################
1050
# mouse sample
1051
#############################################
1052
butstatus=('OFF', 'ON')
1053
1054
class MouseSample(Sample):
1055
    def __init__(self):
1056
        self.name = 'Mouse support'
1057
1058
        self.lbut = self.mbut = self.rbut = 0
1059
@@ 1025-1039 (lines=15) @@
1022
            # the red channel
1023
            sample_console.default_bg = libtcod.red
1024
1025
            sample_console.rect(0, 3, 15, 15, False, libtcod.BKGND_SET)
1026
            self.circle.blit_rect(sample_console, 0, 3, -1, -1,
1027
                                    libtcod.BKGND_MULTIPLY)
1028
            # the green channel
1029
            sample_console.default_bg = img_green
1030
            sample_console.rect(15, 3, 15, 15, False, libtcod.BKGND_SET)
1031
            self.circle.blit_rect(sample_console,
1032
                                  15, 3, -1, -1, libtcod.BKGND_MULTIPLY)
1033
            # the blue channel
1034
            sample_console.default_bg = img_blue
1035
            sample_console.rect(30, 3, 15, 15, False, libtcod.BKGND_SET)
1036
            self.circle.blit_rect(sample_console,
1037
                                  30, 3, -1, -1, libtcod.BKGND_MULTIPLY)
1038
        else:
1039
            # render circle.png with normal blitting
1040
            self.circle.blit_rect(sample_console,
1041
                                  0, 3, -1, -1, libtcod.BKGND_SET)
1042
            self.circle.blit_rect(sample_console,