UNPKG

bingo-master

Version:

A Bingo game library implemented in TypeScript

32 lines (31 loc) 1.32 kB
import { Tile } from "./types"; export declare class Bingo { readonly size: number; readonly members_count: number; private boards; private canceled; private cancel_counts; private is_gameover; private winner; constructor(size?: number, count?: number); getTurn(): number; getBoards(): number[][][]; getMyBoard(ind: number): number[][]; getMyCancelCount(ind: number): number; getMyCanceledInfo(ind: number): string[]; getMyBoardInfo(ind: number): Tile[][]; getCanceled(): number[]; getCancelCounts(): number[]; getWinner(): number | null; cancelNumber(num: number, turn: number): void; /** * README BEFOR USING THIS FUNCTION * This function is for suppose you want the numbers of your choice like * you have build your own way of random arangement (but honestly i don't remond you to do that it will simply sounds unfair) * another or the MAJOR REASON for the existance of this function is: suppose your server goes down and * games are goin on and you have stored the game state in DB OR redis whatever now you want to reinitialize it * then use this function (or now you are the boss so do wahtever you feel good ) * */ customInitialize(newBoards: number[][][], newCanceles: number[]): void; }