Ejemplo n.º 1
0
 def D():
     kk = Kakuro()
     kk.setBoard(self.variables["SizeX"],self.variables["SizeY"], ".")
     
     kk.difficulty = self.variables["HideChance"]/100
     
     kk.buildBoard()
     
     self.gameEngine = puzzle_game_main.mainGame(kk, kk.title)
     self.gameEngine.build(self.variables["Time"]*60, self.variables["CheckTime"]*60)
Ejemplo n.º 2
0
 def C():
     mz = MazeB()
     mz.setBoard(self.variables["SizeX"],self.variables["SizeY"], ".")
     
     #mz.setOnePath(self.variables["OnePath"])
     
     mz.buildBoard()
         
     self.gameEngine = puzzle_game_main.mainGame(mz, mz.title)
     self.gameEngine.build(self.variables["Time"]*60)
Ejemplo n.º 3
0
 def F():
     nn = Nonogram()
     
     if self.variables["NonogramFile"] == 0:
         #load an image based on the input
         dir_loc = "NonoImages/" + self.variables["Size_Nono"] + "/"
         
         nn.loadImage(dir_loc + random.choice(os.listdir(dir_loc)), size=self.variables["Size_Nono"])
     
     else: nn.loadImage(self.variables["NonogramFile"], self.variables["Size_Nono"])
     
     nn.buildBoard()
     
     self.gameEngine = puzzle_game_main.mainGame(nn, nn.title)
     self.gameEngine.build(self.variables["Time"]*60)
Ejemplo n.º 4
0
        def A():
            ns = NumberSearch()
            ns.setBoard(self.variables["SizeX"], self.variables["SizeY"], ".") #width, height, filler
            
            ns.generateKeys(self.variables["HowManyNum"], self.variables["NumLength"]-2, self.variables["NumLength"]) #generate keys of 10 that has a length between 5 and 8
            
            dirModes = {
                "Down Right": 0,
                "Down Right Diagonal": 1,
                "All Possible Direction": 2
                }

            ns.setDirection(dirModes[self.variables["Direction"]])
            ns.buildBoard() #build the board
            
            self.gameEngine = puzzle_game_main.mainGame(ns, ns.title)
            self.gameEngine.build(self.variables["Time"]*60)
Ejemplo n.º 5
0
 def E():
     
     hd = Hidato()
     
     
     hd.diagonals = (self.variables["Direction"] == "Diagonal Included")
     hd.difficulty = self.variables["HideChance"]/100
     
     if (self.variables["SizeX"]+self.variables["SizeY"])//2 > 6:
         hd.pureRandomRate = 0.75
         hd.extremeFast = True
     
     hd.setBoard(self.variables["SizeX"], self.variables["SizeY"], '.')
     
     hd.buildBoard()
     
     self.gameEngine = puzzle_game_main.mainGame(hd, hd.title)
     self.gameEngine.build(self.variables["Time"]*60, diagonals=(self.variables["Direction"] == "Diagonal Included"))
Ejemplo n.º 6
0
 def G():
     def getAQuote():
         
         with open('quotes.json', 'r', encoding="utf-8") as f:
             data = json.load(f)
         
         pick = random.choice(data['quotes'])
         
         return [pick["quote"], pick["author"]]
         
         #return load
         
     cc = Cryptogram()
     
     x = getAQuote()
     cc.load_Text(x[0],x[1])
         
     cc.revealAmount = self.variables["InitialLetters"]
     cc.process_Text()
     
     self.gameEngine = puzzle_game_main.mainGame(cc, cc.title)
     self.gameEngine.build(self.variables["Time"]*60)
Ejemplo n.º 7
0
        def B():
            cw = Crossword()
            cw.setBoard(self.variables["SizeX"], self.variables["SizeY"], ".")
            
            dir_loc = "CrosswordTemplates/" 
                
            cw.loadText(dir_loc + random.choice(os.listdir(dir_loc)))
            
            dirModes = {
                "Down Right": 0, 
                "Down Right and Reverse":1
            }

            cw.setDirection(dirModes[self.variables["Direction"]])
            
            cw.difficulty = self.variables["HideChance"]/100
            
            cw.buildBoard()
            #cw.printBoard()
            
            self.gameEngine = puzzle_game_main.mainGame(cw, cw.title)
            self.gameEngine.build(self.variables["Time"]*60)