This commit is contained in:
2025-11-03 18:42:04 -08:00
parent 30649488bb
commit eb084e1f07
12 changed files with 64 additions and 15 deletions

View File

@@ -1,8 +1,8 @@
use wasm_bindgen::prelude::*;
mod ansi;
mod gamestate;
mod gamestatehuman;
mod minmaxgame;
mod minmaxgamehuman;
mod terminput;
#[global_allocator]

View File

@@ -9,7 +9,7 @@ use wasm_bindgen::prelude::*;
use crate::{ansi, terminput::TermInput};
#[wasm_bindgen]
pub struct GameStateHuman {
pub struct MinMaxGameHuman {
/// Red player
human: TermInput,
@@ -26,7 +26,7 @@ pub struct GameStateHuman {
}
#[wasm_bindgen]
impl GameStateHuman {
impl MinMaxGameHuman {
#[wasm_bindgen(constructor)]
pub fn new(
max_script: &str,
@@ -34,7 +34,7 @@ impl GameStateHuman {
max_debug_callback: js_sys::Function,
game_state_callback: js_sys::Function,
) -> Result<GameStateHuman, String> {
) -> Result<MinMaxGameHuman, String> {
Self::new_native(
max_script,
move |s| {