More targets gardening (now preserving seeds)

This commit is contained in:
Lynn
2022-01-19 16:22:16 +01:00
parent 6583be1968
commit ddbf3c2a7b
2 changed files with 24 additions and 20 deletions

View File

@@ -23,7 +23,11 @@ const targets = targetList.slice(0, targetList.indexOf("murky") + 1); // Words n
function randomTarget(wordLength: number): string {
const eligible = targets.filter((word) => word.length === wordLength);
return pick(eligible);
let candidate: string;
do {
candidate = pick(eligible);
} while (/\*/.test(candidate));
return candidate;
}
function getChallengeUrl(target: string): string {