import { Socket } from "socket.io-client" ; import { CombatStats } from "../../common/CombatStats" ; import { EncounterState } from "../../common/EncounterState" ; import { PlayerViewCombatantState } from "../../common/PlayerViewCombatantState" ; import { PlayerViewSettings } from "../../common/PlayerViewSettings" ; export class PlayerViewClient { constructor ( private socket ) { } public DisplayCombatStats ( encounterId , stats ) { this . socket . emit ( "combat stats" , encounterId , stats ) ; } public JoinEncounter ( encounterId ) { this . socket . emit ( "join encounter" , encounterId ) ; } public RequestCustomEncounterId = ( requestedId ) => new Promise < boolean > ( done => { this . socket . emit ( "request custom id" , requestedId , done ) ; } ) ; public UpdateEncounter ( encounterId , updatedEncounter ) { this . socket . emit ( "update encounter" , encounterId , updatedEncounter ) ; } public UpdateSettings ( encounterId , updatedSettings ) { this . socket . emit ( "update settings" , encounterId , updatedSettings ) ; } }