Move to a hand-curated targets list
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
import "./App.css";
|
||||
import common from "./common.json";
|
||||
import { dictionarySet, pick, seed } from "./util";
|
||||
import { seed } from "./util";
|
||||
import Game from "./Game";
|
||||
import { names } from "./names";
|
||||
import { useState } from "react";
|
||||
import { Row, RowState } from "./Row";
|
||||
import { Clue } from "./clue";
|
||||
|
||||
@@ -3,9 +3,8 @@ import { Row, RowState } from "./Row";
|
||||
import dictionary from "./dictionary.json";
|
||||
import { Clue, clue } from "./clue";
|
||||
import { Keyboard } from "./Keyboard";
|
||||
import common from "./common.json";
|
||||
import targetList from "./targets.json";
|
||||
import { dictionarySet, pick, resetRng, seed } from "./util";
|
||||
import { names } from "./names";
|
||||
|
||||
enum GameState {
|
||||
Playing,
|
||||
@@ -18,9 +17,8 @@ interface GameProps {
|
||||
hidden: boolean;
|
||||
}
|
||||
|
||||
const targets = common
|
||||
.slice(0, 20000) // adjust for max target freakiness
|
||||
.filter((word) => dictionarySet.has(word) && !names.has(word));
|
||||
const targets = targetList
|
||||
.slice(0, targetList.indexOf("murky") + 1); // Words no rarer than this one
|
||||
|
||||
function randomTarget(wordLength: number) {
|
||||
const eligible = targets.filter((word) => word.length === wordLength);
|
||||
|
||||
20
src/names.ts
20
src/names.ts
@@ -1,20 +0,0 @@
|
||||
export const names: Set<string> = new Set([
|
||||
"anglo",
|
||||
"bible",
|
||||
"carol",
|
||||
"costa",
|
||||
"dutch",
|
||||
"fossa", // just too hard
|
||||
"harry",
|
||||
"jimmy",
|
||||
"jones",
|
||||
"lewis",
|
||||
"maria",
|
||||
"paris",
|
||||
"pedro",
|
||||
"roger",
|
||||
"sally",
|
||||
"savoy",
|
||||
"texas",
|
||||
"willy",
|
||||
]);
|
||||
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user