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

    Constructors

    Properties

    DEFAULT_HEIGHT: number = 9
    DEFAULT_WIDTH: number = 9

    Methods

    • Board factory. Returns a board with the provided dimensions and the given piles specified as BoardEntrys.

      Parameters

      • width: number

        the custom board width

      • height: number

        the custom board height

      • piles: BoardEntry[]

        a list of piles tobe included in the board

      Returns Board

      a board with the given dimensions and the given piles

    • Board factory. Returns a board with the default initial state.

      Parameters

      • player1: string

        the username of player1

      • player2: string

        the username of player2

      Returns Board

      a board with the default initial state

    • Board factory. Takes as input an object containing all board properties, and returns an object of type Board with the given properties.

      Parameters

      • object: any

        an object containing the board properties

      Returns Board

      a board with the provided properties