windows full features
This commit is contained in:
6
utils/functions.py
Normal file
6
utils/functions.py
Normal file
@@ -0,0 +1,6 @@
|
||||
from enum import Enum
|
||||
import random as rd
|
||||
|
||||
def select_random(rdata : dict, enum : Enum) -> Enum:
|
||||
# select a random value of the dict according to his coef and return the corresponding value in the enum
|
||||
return enum[rd.choice([elt for elt,num in rdata.items() for _ in range(num)]).upper()]
|
||||
Reference in New Issue
Block a user