Move to a hand-curated targets list
This commit is contained in:
@@ -1,8 +1,6 @@
|
|||||||
import "./App.css";
|
import "./App.css";
|
||||||
import common from "./common.json";
|
import { seed } from "./util";
|
||||||
import { dictionarySet, pick, seed } from "./util";
|
|
||||||
import Game from "./Game";
|
import Game from "./Game";
|
||||||
import { names } from "./names";
|
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { Row, RowState } from "./Row";
|
import { Row, RowState } from "./Row";
|
||||||
import { Clue } from "./clue";
|
import { Clue } from "./clue";
|
||||||
|
|||||||
@@ -3,9 +3,8 @@ import { Row, RowState } from "./Row";
|
|||||||
import dictionary from "./dictionary.json";
|
import dictionary from "./dictionary.json";
|
||||||
import { Clue, clue } from "./clue";
|
import { Clue, clue } from "./clue";
|
||||||
import { Keyboard } from "./Keyboard";
|
import { Keyboard } from "./Keyboard";
|
||||||
import common from "./common.json";
|
import targetList from "./targets.json";
|
||||||
import { dictionarySet, pick, resetRng, seed } from "./util";
|
import { dictionarySet, pick, resetRng, seed } from "./util";
|
||||||
import { names } from "./names";
|
|
||||||
|
|
||||||
enum GameState {
|
enum GameState {
|
||||||
Playing,
|
Playing,
|
||||||
@@ -18,9 +17,8 @@ interface GameProps {
|
|||||||
hidden: boolean;
|
hidden: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
const targets = common
|
const targets = targetList
|
||||||
.slice(0, 20000) // adjust for max target freakiness
|
.slice(0, targetList.indexOf("murky") + 1); // Words no rarer than this one
|
||||||
.filter((word) => dictionarySet.has(word) && !names.has(word));
|
|
||||||
|
|
||||||
function randomTarget(wordLength: number) {
|
function randomTarget(wordLength: number) {
|
||||||
const eligible = targets.filter((word) => word.length === wordLength);
|
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