def init(self,voice=1): if voice==1: super().init() self.bgColor = (255,255,255) self.count = 0 self.sec = 0 self.min = 0 self.timetext = "TIME : 0:00" self.timechange = False self.movechange = False self.mute = -1 self.mode = "play" #self.mode = "solve" self.solvelist = [5,6,7,3,2,6,5,1,2,3,7] self.solvelist += [11,12,8,4,3,7,6,10,9] self.solvelist += [13,14,15,16,12,11,10,9,13,14,15,11] self.solvelist += [10,14,13,9,10,6,5,9,13,14,15] self.solveindex = len(self.solvelist)-1 datastring = "1000\n" datastring += "1000\n" writeFile("game4data.txt",datastring) global curk,k curk,k = 16,16 global pg,pp pg = [2,7,10,11,14] pp = [1,3,4,5,9,13] Gear.init() Tile.init() Pipe.init() self.win = False self.gears = pygame.sprite.Group() self.pipes = pygame.sprite.Group() self.gears.add(Gear(330-65,180+65,-1,0)) self.gears.add(Gear(330+65*4,180,17,0,1)) self.tiles = pygame.sprite.Group() for i in range(4): for j in range(4): x=330+65*j y=180+65*i num=j*4+i+1 if num != curk: self.tiles.add(Tile(x,y,num)) if num in pg: self.gears.add(Gear(x,y,num,0)) if num in pp: if num == 13: self.pipes.add(Pipe(x,y,num,4)) elif num == 5: self.pipes.add(Pipe(x,y,num,5)) else: self.pipes.add(Pipe(x,y,num,1)) self.exit = 20 self.exittype = 1 self.timer = 15
def init(self): super().init() self.bgColor = (255,255,255) self.count = 15 self.sec = 0 self.min = 0 self.timetext = "TIME : 0:00" self.moveup = False self.mute = -1 global curk,k curk,k = 3,3 global p p = [1,4,6,7,10,11,13,16] Gear.init() Tile.init() self.win = False self.gears = pygame.sprite.Group() self.gears.add(Gear(330,180+65*4,-1,1)) self.gears.add(Gear(330+65*4,180,17,0)) self.tiles = pygame.sprite.Group() for i in range(4): for j in range(4): x=330+65*j y=180+65*i num=j*4+i+1 if num != curk: self.tiles.add(Tile(x,y,num)) if num in p: if num==4: self.gears.add(Gear(x,y,num,1)) else: self.gears.add(Gear(x,y,num,0))
def init(self,voice=1): if voice==1: super().init() self.bgColor = (255,255,255) self.count = 0 self.sec = 0 self.min = 0 self.timetext = "TIME : 0:00" self.timechange = False self.movechange = False self.mute = -1 self.mode = "play" #self.mode = "solve" self.solvelist = [11,10,9,13,14,10,11,7,6,10,11,12,8] self.solvelist += [7,3,2,6,10,11,12,8,7,3] self.solveindex = len(self.solvelist)-1 datastring = "1000\n" datastring += "1000\n" writeFile("game5data.txt",datastring) global curk,k curk,k = 4,4 global p3,p6 p3 = [1,2,3,5,6,9] p6 = [8,11,12,14,15,16] Pipe.init() Tile.init() Gear.init() self.win = False self.pipes = pygame.sprite.Group() self.tiles = pygame.sprite.Group() self.gears = pygame.sprite.Group() self.gears.add(Gear(330+65*3+5,180-55,-1,0,1)) for i in range(4): for j in range(4): x=332+65*j y=180+65*i num = j*4+i+1 if num in p3: self.pipes.add(Pipe(x,y,num,3)) elif num in p6: self.pipes.add(Pipe(x,y,num,6)) elif num!= curk: self.tiles.add(Tile(x,y,num)) self.exit = 0 self.exittype = 6 self.timer = 15 self.gassound = pygame.mixer.Sound('sound/gas01.wav') self.gassound.play() self.gassound.set_volume(0.2)
def init(self): super().init() self.bgColor = (255,255,255) self.count = 0 self.sec = 3100 self.min = 0 self.timetext = "TIME : 0:30" self.timeup = False self.mute = -1 global curk,k curk,k = 4,4 global p1,p2,p3,p4,p5,p6,p7 p1 = [5,7,10,12,15] p2 = [8,9] p3 = [14] p4 = [] p5 = [3] p6 = [2] p7 = [6,11] Pipe.init() Tile.init() Gear.init() self.win = False self.pipes = pygame.sprite.Group() self.tiles = pygame.sprite.Group() self.gears = pygame.sprite.Group() self.gears.add(Gear(330+65*3+5,180-55,-1,0)) for i in range(4): for j in range(4): x=332+65*j y=180+65*i num = j*4+i+1 if num in p1: self.pipes.add(Pipe(x,y,num,1)) elif num in p2: self.pipes.add(Pipe(x,y,num,2)) elif num in p3: self.pipes.add(Pipe(x,y,num,3)) elif num in p4: self.pipes.add(Pipe(x,y,num,4)) elif num in p5: self.pipes.add(Pipe(x,y,num,5)) elif num in p6: self.pipes.add(Pipe(x,y,num,6)) elif num in p7: self.pipes.add(Pipe(x,y,num,7)) elif num!= curk: self.tiles.add(Tile(x,y,num)) self.timer = 15
def init(self): super().init() self.bgColor = (255,255,255) self.count = 50 self.sec = 0 self.min = 0 self.timetext = "TIME : 0:00" self.moveup = False self.mute = -1 global curk,k curk,k = 16,16 global pg,pp pg = [2,7,10,11,14] pp = [1,3,4,5,9,13] Gear.init() Tile.init() Pipe.init() self.win = False self.gears = pygame.sprite.Group() self.pipes = pygame.sprite.Group() self.gears.add(Gear(330-65,180+65,-1,0)) self.gears.add(Gear(330+65*4,180,17,0)) self.tiles = pygame.sprite.Group() for i in range(4): for j in range(4): x=330+65*j y=180+65*i num=j*4+i+1 if num != curk: self.tiles.add(Tile(x,y,num)) if num in pg: self.gears.add(Gear(x,y,num,0)) if num in pp: if num == 13: self.pipes.add(Pipe(x,y,num,4)) elif num == 5: self.pipes.add(Pipe(x,y,num,5)) else: self.pipes.add(Pipe(x,y,num,1)) self.exit = 20 self.exittype = 1 self.timer = 15
def init(self): super().init() self.bgColor = (255,255,255) self.count = 0 self.sec = 2100 self.min = 0 self.timetext = "TIME: 0:20" self.timeup = False self.mute = -1 global curk,k curk,k = 3,3 global p1,p2,p3 p1 = [5,8,9,12] p2 = [2,14,15] p3 = [13] Pipe.init() Tile.init() Gear.init() self.win = False self.pipes = pygame.sprite.Group() self.tiles = pygame.sprite.Group() self.gears = pygame.sprite.Group() self.gears.add(Gear(330+65*3+5,180-55,-1,0)) for i in range(4): for j in range(4): x=332+65*j y=180+65*i num = j*4+i+1 if num in p1: self.pipes.add(Pipe(x,y,num,1)) elif num in p2: self.pipes.add(Pipe(x,y,num,2)) elif num in p3: self.pipes.add(Pipe(x,y,num,3)) elif num!= curk: self.tiles.add(Tile(x,y,num)) self.exit = 0 self.exittype = 1 self.timer = 15
def init(self,voice=1): if voice==1: super().init() self.bgColor = (255,255,255) self.count = 0 self.sec = 0 self.min = 0 self.timetext = "TIME : 0:00" self.timechange = False self.movechange = False self.mute = -1 self.mode = "play" #self.mode = "solve" self.solvelist = [12,11,15,16,12,11,10,9,5,6,7] self.solveindex = len(self.solvelist)-1 global curk,k curk,k = 3,3 global p p = [1,4,6,7,10,11,13,16] datastring = "1000\n" datastring += "1000\n" writeFile("game1data.txt",datastring) Gear.init() Tile.init() self.win = False self.gears = pygame.sprite.Group() self.gears.add(Gear(330,180+65*4,-1,1)) self.gears.add(Gear(330+65*4,180,17,0,1)) self.tiles = pygame.sprite.Group() for i in range(4): for j in range(4): x=330+65*j y=180+65*i num=j*4+i+1 if num != curk: self.tiles.add(Tile(x,y,num)) if num in p: if num==4: self.gears.add(Gear(x,y,num,1)) else: self.gears.add(Gear(x,y,num,0))
def init(self): super().init() self.bgColor = (255,255,255) self.count = 30 self.sec = 0 self.min = 0 self.timetext = "TIME : 0:00" self.moveup = False self.mute = -1 global curk,k curk,k = 4,4 global p3,p6 p3 = [1,2,3,5,6,9] p6 = [8,11,12,14,15,16] Pipe.init() Tile.init() Gear.init() self.win = False self.pipes = pygame.sprite.Group() self.tiles = pygame.sprite.Group() self.gears = pygame.sprite.Group() self.gears.add(Gear(330+65*3+5,180-55,-1,0)) for i in range(4): for j in range(4): x=332+65*j y=180+65*i num = j*4+i+1 if num in p3: self.pipes.add(Pipe(x,y,num,3)) elif num in p6: self.pipes.add(Pipe(x,y,num,6)) elif num!= curk: self.tiles.add(Tile(x,y,num)) self.exit = 0 self.exittype = 6 self.timer = 15
def init(self): super().init() self.bgColor = (255,255,255) self.count = 0 self.sec = 1000 self.min = 0 self.timetext = "TIME : 0:10" self.timeup = False self.mute = -1 global curk,k curk = random.randint(1,16) k = curk global p p=[] while len(p)<7: a = random.randint(1,16) if a!=k and not a in p: p += [a] Gear.init() Tile.init() self.win = False self.gears = pygame.sprite.Group() self.gears.add(Gear(330,180+65*4,-1,1)) self.gears.add(Gear(330+65*4,180,17,0)) self.tiles = pygame.sprite.Group() for i in range(4): for j in range(4): x=330+65*j y=180+65*i num=j*4+i+1 if num != curk: self.tiles.add(Tile(x,y,num)) if num in p: if num==4: self.gears.add(Gear(x,y,num,1)) else: self.gears.add(Gear(x,y,num,0))
def init(self,voice=1): if voice==1: super().init() self.bgColor = (255,255,255) self.count = 0 self.sec = 0 self.min = 0 self.timetext = "TIME: 0:00" self.timechange = False self.movechange = False self.mute = -1 self.mode = "play" #self.mode = "solve" self.solvelist = [10,6,7,3,2,1,5,9] self.solvelist += [10,6,5,9,10,6,2,3] self.solvelist += [4,8,12,11,7,8] self.solvelist += [12,11,10,6,2,3] self.solvelist += [7,8,4,3,7,8,12,11,10] self.solvelist += [6,7,8,12,11,10,9,5,6,7] self.solveindex = len(self.solvelist)-1 datastring = "1000\n" datastring += "1000\n" writeFile("game6data.txt",datastring) global curk,k curk,k = 8,8 global p1,p2,p3,p4,p5,p6 p1 = [] p2 = [1,6,9] p3 = [4] p4 = [3] p5 = [10] p6 = [5] Pipe.init() Tile.init() self.win = False self.pipes = pygame.sprite.Group() self.tiles = pygame.sprite.Group() for i in range(4): for j in range(3): x=332+65*j y=180+65*i num = j*4+i+1 if num in p1: self.pipes.add(Pipe(x,y,num,1)) elif num in p2: self.pipes.add(Pipe(x,y,num,2)) elif num in p3: self.pipes.add(Pipe(x,y,num,3)) elif num in p4: self.pipes.add(Pipe(x,y,num,4)) elif num in p5: self.pipes.add(Pipe(x,y,num,5)) elif num in p6: self.pipes.add(Pipe(x,y,num,6)) elif num!= curk: self.tiles.add(Tile(x,y,num)) self.exit = 8 self.exittype = "init" self.timer = 15 self.gassound = pygame.mixer.Sound('sound/gas01.wav') self.gassound.play() self.gassound.set_volume(0.2)
def init(self,voice=1): if voice==1: super().init() self.bgColor = (255,255,255) self.count = 0 self.sec = 0 self.flysec = 0 self.min = 0 self.timetext = "TIME: 0:00" self.timechange = False self.movechange = False self.mute = -1 self.mode = "play" #self.mode = "solve" self.solvelist = [7,8,4,3,7,11,15,14,10,11,7,6,5] self.solvelist += [9,13,14,10,9,5,6,10,9,5,1] self.solvelist += [2,6,10,11,15,14,10,6] self.solvelist += [7,11,15,16,12,11,10,14,15,16,12,11] self.solveindex = len(self.solvelist)-1 datastring = "1000\n" datastring += "1000\n" writeFile("game8data.txt",datastring) global curk1,curk2 curk1,curk2 = 7,11 global p1,p2 p1 = [2,3,5,8,9,12,14,15] p2 = [2,4,7,14] self.flip = 1 Pipe.init() Tile.init() Gear.init() self.win = False self.pipes = pygame.sprite.Group() self.backpipes = pygame.sprite.Group() self.tiles = pygame.sprite.Group() self.backtiles = pygame.sprite.Group() self.gears = pygame.sprite.Group() self.gears.add(Gear(265,118,-1,0,1)) for i in range(4): for j in range(4): x=332+65*j y=180+65*i num = j*4+i+1 if num in p1: self.pipes.add(Pipe(x,y,num,1)) elif num!= curk1: self.tiles.add(Tile(x,y,num)) for i in range(4): for j in range(4): x=332+65*j y=180+65*i num = j*4+i+1 if num in p2: self.backpipes.add(Pipe(x,y,num,2)) elif num!= curk2: self.backtiles.add(Tile(x,y,num)) self.exit1 = 0 self.exittype1 = "left" self.exit2 = 0 self.exittype2 = "none" self.timer = 15 self.gassound = pygame.mixer.Sound('sound/gas01.wav') self.gassound.play() self.gassound.set_volume(0.2)
def init(self,voice=1): if voice==1: super().init() self.bgColor = (255,255,255) self.count = 0 self.sec = 0 self.min = 0 self.timetext = "TIME : 0:00" self.timechange = False self.movechange = False self.mute = -1 self.mode = "play" #self.mode = "solve" self.solvelist = [2,6,7,8,4,3,2,6,5,1,2,6] self.solvelist += [10,9,13,14,10,9,5,6,10] self.solvelist += [9,13,14,15,11,10,9,13,14,15,16] self.solvelist += [12,11,10,9,13,14,15,16,12,8] self.solveindex = len(self.solvelist)-1 datastring = "1000\n" datastring += "1000\n" writeFile("game7data.txt",datastring) global curk,k curk,k = 4,4 global p1,p2,p3,p4,p5,p6,p7 p1 = [5,7,10,12,15] p2 = [8,9] p3 = [14] p4 = [] p5 = [3] p6 = [2] p7 = [6,11] Pipe.init() Tile.init() Gear.init() self.win = False self.pipes = pygame.sprite.Group() self.tiles = pygame.sprite.Group() self.gears = pygame.sprite.Group() self.gears.add(Gear(330+65*3+5,180-55,-1,0,1)) for i in range(4): for j in range(4): x=332+65*j y=180+65*i num = j*4+i+1 if num in p1: self.pipes.add(Pipe(x,y,num,1)) elif num in p2: self.pipes.add(Pipe(x,y,num,2)) elif num in p3: self.pipes.add(Pipe(x,y,num,3)) elif num in p4: self.pipes.add(Pipe(x,y,num,4)) elif num in p5: self.pipes.add(Pipe(x,y,num,5)) elif num in p6: self.pipes.add(Pipe(x,y,num,6)) elif num in p7: self.pipes.add(Pipe(x,y,num,7)) elif num!= curk: self.tiles.add(Tile(x,y,num)) self.timer = 15 self.gassound = pygame.mixer.Sound('sound/gas01.wav') self.gassound.play() self.gassound.set_volume(0.2)