UNPKG

@rbxts/tic-tac-toe

Version:

Modular tic-tac-toe without dependencies, because why not.

42 lines (41 loc) 1.14 kB
import { TicTacToeSymbol } from "./enum/TicTacToeSymbol"; /** * The representation of a TicTacToe cell. */ export declare class TicTacToeCell { private row; private col; private symbol; /** * Constructs a new TicTacToeCell with the given row, column and symbol. * * @param row The row of the cell. * @param col The column of the cell. * @param symbol The symbol of the cell. */ constructor(row: number, col: number, symbol: TicTacToeSymbol); /** * Constructs an empty TicTacToeCell with the given row and column. * * @param row The row of the cell. * @param col The column of the cell. * @returns The empty TicTacToeCell. */ static empty(row: number, col: number): TicTacToeCell; /** * Returns whether the cell is empty. */ isEmpty(): boolean; /** * Returns the row of the cell. */ getRow(): number; /** * Returns the column of the cell. */ getCol(): number; /** * Returns the symbol of the cell. */ getSymbol(): TicTacToeSymbol; }