onix-chess-game
Version:
Chess game board
28 lines (27 loc) • 953 B
TypeScript
import { BoardSize } from "onix-board-assets";
export declare type CHANGE_SIZE = 'CHANGE_SIZE';
export declare type SET_PIECE = 'SET_PIECE';
export declare type SET_SQUARE = 'SET_SQUARE';
export declare type FLIP_BOARD = 'FLIP_BOARD';
export declare type SET_COORDS = 'SET_COORDS';
export declare const FLIP_BOARD: FLIP_BOARD;
export declare const SET_COORDS: SET_COORDS;
export declare const CHANGE_SIZE: CHANGE_SIZE;
export declare const SET_PIECE: SET_PIECE;
export declare const SET_SQUARE: SET_SQUARE;
export declare type SetBoardSizeAction = {
type: CHANGE_SIZE;
size: BoardSize;
};
export declare type SetPieceAction = {
type: SET_PIECE;
piece: string;
};
export declare type SetSquareAction = {
type: SET_SQUARE;
square: string;
};
export declare type BoardToggleAction = {
type: FLIP_BOARD | SET_COORDS;
};
export declare type BoardAction = BoardToggleAction | SetBoardSizeAction | SetPieceAction | SetSquareAction;