p2p-lockstep-kit-ui 0.1.2 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -46,6 +46,8 @@ import "p2p-lockstep-kit-ui/style.css";
46
46
  game-title="Gomoku"
47
47
  session-id="gomoku"
48
48
  theme="dark"
49
+ allow-draw
50
+ allow-resign
49
51
  ></p2p-lockstep-app>
50
52
  ```
51
53
 
@@ -117,10 +119,13 @@ Game runtime actions:
117
119
 
118
120
  ```ts
119
121
  runtime.actions.move(move);
122
+ runtime.actions.offerDraw();
123
+ runtime.actions.resign();
120
124
  ```
121
125
 
122
- Ready, start, undo, restart, approve, and reject are owned by the UI shell
123
- controls. Game packages should not drive those controls directly.
126
+ Ready, start, undo, restart, draw approval, and resign confirmation are owned
127
+ by the UI shell controls. `allow-draw` and `allow-resign` opt a game into the
128
+ additional controls; game packages should normally let the shell invoke them.
124
129
 
125
130
  Runtime state:
126
131
 
@@ -6,6 +6,7 @@ export declare class P2PLockstepAppElement extends HTMLElement {
6
6
  disconnectedCallback(): void;
7
7
  attributeChangedCallback(name: string, _oldValue: string | null, newValue: string | null): void;
8
8
  getRuntime(): GameRuntime | null;
9
+ resumeConnection(): void;
9
10
  getBoardHost(): HTMLDivElement | null;
10
11
  render(): void;
11
12
  }