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,
|
PlayerAndScore,
|
||||||
ScoreResult,
|
ScoreResult,
|
||||||
Tray, TurnAction, TurnAdvanceResult
|
Tray, TurnAction, TurnAdvanceResult
|
||||||
} from "word_grid";
|
} from "../../pkg/word_grid";
|
||||||
import {
|
import {
|
||||||
HighlightableLetterData,
|
HighlightableLetterData,
|
||||||
LocationType,
|
LocationType,
|
||||||
|
@ -131,7 +131,7 @@ export function Game(props: {
|
||||||
});
|
});
|
||||||
|
|
||||||
useEffect(() => {
|
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
|
// 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
|
// it will always be false if the player that just went was the AI
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
import {useState} from "react";
|
import {useState} from "react";
|
||||||
import {Difficulty, GameWasm} from 'word_grid';
|
import {Difficulty, GameWasm} from '../../pkg/word_grid';
|
||||||
import {Settings} from "./utils";
|
import {Settings} from "./utils";
|
||||||
import {Game} from "./Game";
|
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 {Game} from "./Game";
|
||||||
import {createRoot} from "react-dom/client";
|
import {createRoot} from "react-dom/client";
|
||||||
import * as React from "react";
|
import * as React from "react";
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"module": "commonjs",
|
"module": "commonjs",
|
||||||
"target": "ES2023",
|
"target": "ES2022",
|
||||||
"jsx": "react-jsx",
|
"jsx": "react-jsx",
|
||||||
"lib": [
|
"lib": [
|
||||||
"es2023",
|
"es2023",
|
||||||
|
|
Loading…
Reference in a new issue