monorepo/kifu/kifu-pwa/core.d.ts

70 lines
1.2 KiB
TypeScript

/*
Generated by typeshare 1.5.0
*/
export interface PlayStoneRequest {
column: number;
row: number;
}
export interface Size {
width: number;
height: number;
}
export type IntersectionElement =
| { type: "Unplayable", content?: undefined }
| { type: "Empty", content: Request }
| { type: "Filled", content: StoneElement };
export interface BoardElement {
size: Size;
spaces: IntersectionElement[];
}
export enum Color {
Black = "Black",
White = "White",
}
export interface PlayerCardElement {
color: Color;
name: string;
rank: string;
clock: string;
}
export interface ChatElement {
messages: string[];
}
export interface TextFieldElement {
}
export interface PlayingFieldView {
board: BoardElement;
player_card_black: PlayerCardElement;
player_card_white: PlayerCardElement;
chat: ChatElement;
message: TextFieldElement;
current_player: Color;
}
export interface Jitter {
x: number;
y: number;
}
export interface StoneElement {
color: Color;
jitter: Jitter;
}
export type Request =
| { type: "PlayingField", content?: undefined }
| { type: "PlayStoneRequest", content: PlayStoneRequest };
export type Response =
| { type: "PlayingFieldView", content: PlayingFieldView };