@gi-tcg/webui-core
TypeScript icon, indicating that this package has built-in type declarations

0.6.4 • Public • Published

@gi-tcg/webui-core Web UI Core for Genius Invokation

Warning

This package is not designed for public use yet. You should make solid-js as a peer dependency to render things exported from this package. For more common scenario, use @gi-tcg/webui package instead.
This is an ESM-only package.

Usage

import { createPlayer } from "@gi-tcg/webui-core";
import "@gi-tcg/webui-core/style.css";

function App() {
  const [io0, Chessboard0] = createPlayer(0);
  const [io1, Chessboard1] = createPlayer(1);

  const io: GameIO = {
    pause: /* ... */,
    players: [io0, io1],
  };
  const game = new Game({ data, io, playerConfigs });
  
  onMounted(() => {
    game.start();
  })

  return (
    <>
      <Chessboard0 />
      <Chessboard1 />
    </>
  );
}

Readme

Keywords

none

Package Sidebar

Install

npm i @gi-tcg/webui-core

Weekly Downloads

20

Version

0.6.4

License

AGPL-3.0-or-later

Unpacked Size

208 kB

Total Files

7

Last publish

Collaborators

  • guyutongxue