Commit 1362f47a by Иван Кубота

print seed in log

parent d44ffc72
Pipeline #516 canceled with stage
......@@ -60,7 +60,7 @@ const quizGenerator = function(type, photo, subType) {
if(attempt === 0){
const types = quizTypes[type+(photo?'Photo':'')];
subType = probabilityRand(types);
log = quizGenerator.log = ['Quiz generate '+type+(photo ? ' with photo':'') +' '+(subType?`${lapk(subType.type)}`:'. FAIL')];
log = quizGenerator.log = ['Random seed: '+Math.random.seeded.getStringSeed(),'Quiz generate '+type+(photo ? ' with photo':'') +' '+(subType?`${lapk(subType.type)}`:'. FAIL')];
}else if(attempt<30){
log = quizGenerator.log;
log.push('\nATTEMPT FAILED!\n\n'+
......
......@@ -13,7 +13,7 @@ function mulberry32(a) {
a = A;
};
out.setStringSeed = function(str) {
str = str.replace(/[^0-9a-z]/g,'');
str = str.replace(/[^0-9a-z]/g,'').substr(0,12);
if(str.length === 0)str = '1';
a = parseInt(str,36);
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment