lotto-draw
Version:
A simple tool used to pick random elements from a mutable collection of weighted participants
21 lines (20 loc) • 726 B
TypeScript
/**
* A participant that holds a number of tickets.
*/
export declare class Participant<TParticipant> {
/** The actual participant. */
private _participant;
/** The number of tickets held by the participant. */
private _tickets;
/**
* Creates an instance of the Participant class.
* @param participant The actual participant.
* @param tickets The number of tickets held by the participant.
*/
constructor(participant: TParticipant, tickets?: number);
/** Gets the actual participant. */
get participant(): TParticipant;
/** Gets or sets the number of tickets held by the participant. */
get tickets(): number;
set tickets(value: number);
}