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);
|
challengeDay = rng.randomInt(chunkDay1, chunkDay13);
|
||||||
} while (birthdays.indexOf(challengeDay) != -1);
|
} while (birthdays.indexOf(challengeDay) != -1);
|
||||||
|
|
||||||
const challengeIndex = rng.randomInt(0, challenges.length - 1);
|
let challengeIndex;
|
||||||
const challenge = challenges[challengeIndex];
|
let challenge;
|
||||||
|
do {
|
||||||
|
challengeIndex = rng.randomInt(0, challenges.length - 1);
|
||||||
|
challenge = challenges[challengeIndex];
|
||||||
challenges.splice(challengeIndex, 1);
|
challenges.splice(challengeIndex, 1);
|
||||||
|
} while (i < 2 && !challenge.endsWith("Easy")); // First 2 challenges should be easy
|
||||||
|
|
||||||
//logger.debug(`challenge on day ${challengeDay}`);
|
//logger.debug(`challenge on day ${challengeDay}`);
|
||||||
eventDays.push({
|
eventDays.push({
|
||||||
|
Loading…
x
Reference in New Issue
Block a user