/*
 Generated by typeshare 1.5.1
*/

export interface PlayStoneRequest {
	column: number;
	row: number;
}

export interface Size {
	width: number;
	height: number;
}

export type IntersectionElement = 
	| { type: "Unplayable", content?: undefined }
	| { type: "Empty", content: CoreRequest }
	| { 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;
	liberties?: number;
}

export type CoreRequest = 
	| { type: "PlayingField", content?: undefined }
	| { type: "PlayStoneRequest", content: PlayStoneRequest };

export type CoreResponse = 
	| { type: "PlayingFieldView", content: PlayingFieldView };

