@andreabiagini5/applicazioni-e-servizi-web-project - v1.1.3
    Preparing search index...

    Interface Board

    Aggregate root of the game board, containing cells.

    interface Board {
        height: number;
        state: Cell[][];
        width: number;
        applyMove(movingPlayer: string, move: Move): void;
        copy(): Board;
        getCell(x: number, y: number): Cell;
        setCell(x: number, y: number, cell: Cell): void;
    }
    Index

    Properties

    height: number

    The height of the board.

    state: Cell[][]

    The state of the board.

    width: number

    The width of the board.

    Methods

    • Applies the privided move to the state.

      Parameters

      • movingPlayer: string

        the player who is making the move.

      • move: Move

        the move to be applied.

      Returns void

    • Returns the cell at the specified position.

      Parameters

      • x: number

        the horizontal coordinate.

      • y: number

        the vertical coordinate.

      Returns Cell

    • Sets the value of the cell at the specified position.

      Parameters

      • x: number

        the horizontal coordinate.

      • y: number

        the vertical coordinate.

      • cell: Cell

        the new cell.

      Returns void