Clean up UI code
This commit is contained in:
parent
c1d7a2f774
commit
e5b2e4139e
4 changed files with 5 additions and 5 deletions
|
@ -7,7 +7,7 @@ import {
|
|||
PlayerAndScore,
|
||||
ScoreResult,
|
||||
Tray, TurnAction, TurnAdvanceResult
|
||||
} from "word_grid";
|
||||
} from "../../pkg/word_grid";
|
||||
import {
|
||||
HighlightableLetterData,
|
||||
LocationType,
|
||||
|
@ -131,7 +131,7 @@ export function Game(props: {
|
|||
});
|
||||
|
||||
useEffect(() => {
|
||||
const newLetterData = props.wasm.get_board_letters() as LetterData[];
|
||||
const newLetterData = props.wasm.get_board_letters() as HighlightableLetterData[];
|
||||
|
||||
// we need to go through and set 'highlight' field to either true or false
|
||||
// it will always be false if the player that just went was the AI
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import * as React from "react";
|
||||
import {useState} from "react";
|
||||
import {Difficulty, GameWasm} from 'word_grid';
|
||||
import {Difficulty, GameWasm} from '../../pkg/word_grid';
|
||||
import {Settings} from "./utils";
|
||||
import {Game} from "./Game";
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
import init, {GameWasm} from '../node_modules/word_grid/word_grid.js';
|
||||
import init, {GameWasm} from '../../pkg/word_grid.js';
|
||||
import {Game} from "./Game";
|
||||
import {createRoot} from "react-dom/client";
|
||||
import * as React from "react";
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "ES2023",
|
||||
"target": "ES2022",
|
||||
"jsx": "react-jsx",
|
||||
"lib": [
|
||||
"es2023",
|
||||
|
|
Loading…
Reference in a new issue