Ensure first 2 challenges are easy
This commit is contained in:
parent
747c155fc6
commit
dd3126e13b
@ -525,9 +525,13 @@ const getCalendarSeason = (week: number): ICalendarSeason => {
|
||||
challengeDay = rng.randomInt(chunkDay1, chunkDay13);
|
||||
} while (birthdays.indexOf(challengeDay) != -1);
|
||||
|
||||
const challengeIndex = rng.randomInt(0, challenges.length - 1);
|
||||
const challenge = challenges[challengeIndex];
|
||||
let challengeIndex;
|
||||
let challenge;
|
||||
do {
|
||||
challengeIndex = rng.randomInt(0, challenges.length - 1);
|
||||
challenge = challenges[challengeIndex];
|
||||
challenges.splice(challengeIndex, 1);
|
||||
} while (i < 2 && !challenge.endsWith("Easy")); // First 2 challenges should be easy
|
||||
|
||||
//logger.debug(`challenge on day ${challengeDay}`);
|
||||
eventDays.push({
|
||||
|
Loading…
x
Reference in New Issue
Block a user