Exemplo n.º 1
0
 def trigger_dog_respin(self, mode="MG"):
     # TODO: can Wild be count as Dog symbol in this case?
     if mode=="MG":
         return len(set(self.window[0]))==1 and self.window[0][0]==Symbols.index("Dog")
     elif mode=="FG":
         return ((len(set(self.window[-1]))==1 and self.window[-1][0]==Symbols.index("Dog")) or
                 (len(set(self.window[0]))==1 and self.window[0][0]==Symbols.index("Dog"))
         )
Exemplo n.º 2
0
def check_payment(symbols_on_line, odds):
    symbol = symbols_on_line[0]
    count = 1
    for n in range(1,len(symbols_on_line)):
        next_symbol = symbols_on_line[n]
        if symbol==next_symbol:
            count += 1
        elif (next_symbol==Symbols.index("Wild") and symbol!=Symbols.index("Scatter")):
            count += 1
        else:
            break
    payment = Odds[symbol][5-count] 
    return count, payment
Exemplo n.º 3
0
 def trigger_free_game(self):
     scatter_code = Symbols.index("Scatter")
     num_scatter = (self.window[1].count(scatter_code) +
                    self.window[2].count(scatter_code) +
                    self.window[3].count(scatter_code)
     )
     return num_scatter>=Num_Scatter_To_Trigger_Free
Exemplo n.º 4
0
 def get_fixed_symbols(self, fixed_symbols, window):
     fixed_symbol_positions = []
     fixed_symbol_codes = [Symbols.index(fixed_symbol) for fixed_symbol in fixed_symbols]
     for n, col in enumerate(window):
         for m, sym in enumerate(col):
             if sym in fixed_symbol_codes:
                 fixed_symbol_positions.append((n,m,sym))
     return fixed_symbol_positions
Exemplo n.º 5
0
 def spin(self):
     # If the MainGameA strip is chosen, then server will pick one randomly using this 
     # weight, and replace all mystery symbol with this symbol for this round only.
     symbol_replace_mystery = random_pick(list(range(len(Weight_For_Mystery))), 
                                          Weight_For_Mystery)        
     stop_index = [random.choice(range(len(rl))) for rl in self.reel]
     for n, win in enumerate(self.window):
         stop = stop_index[n]
         self.window[n] = self.extended_reel[n][stop:stop+len(win)]
         # Now we replace the `Mystery` symbol (if any) with the symbol we just picked.
         self.window[n] = [symbol_replace_mystery if x==Symbols.index("Mystery") else x for x in self.window[n]]           
Exemplo n.º 6
0
 def mirror_full_stack_symbols(self):
     # TODO: Only mirror the first and last columns?
     if len(set(self.window[0]))==1 and self.window[0][0]==Symbols.index("Dog"):
         self.window[-1] = self.window[0]
     elif len(set(self.window[-1]))==1 and self.window[-1][0]==Symbols.index("Dog"):
         self.window[0] = self.window[-1]