import { ISelections , ISelectionsData , ISelectionsDataFull } from '../interfaces/IGame' ; export class Selections implements ISelections { public static parse ( data ) { return new Selections ( data . selectionType , data . selectionValue , data . entrantId , data . participantId ) ; } public static parseArray ( data ) { return data . map ( e => Selections . parse ( e ) ) ; } public static parseFull ( data ) { return data . selections . map ( selectionsData => Selections . parse ( selectionsData ) ) ; } private selectionType : string ; private selectionValue : number ; private entrantId : number ; private attendeeId : number | null ; constructor ( selectionType , selectionValue , entrantId , participantId ) { this . selectionType = selectionType ; this . selectionValue = selectionValue ; this . entrantId = entrantId ; this . attendeeId = participantId ; } public getSelectionType ( ) { return this . selectionType ; } public getSelectionValue ( ) { return this . selectionValue ; } public getEntrantId ( ) { return this . entrantId ; } public getAttendeeId ( ) { return this . attendeeId ; } }