From: gparant Date: Sun, 3 May 2020 14:18:05 +0000 (+0200) Subject: Merge branch 'event_group' into webrtc X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=8357f9b8c247352c7b44b3af707179efeacdbfd6;p=libreadventure.git Merge branch 'event_group' into webrtc # Conflicts: # back/src/Model/Group.ts # back/src/Model/World.ts --- 8357f9b8c247352c7b44b3af707179efeacdbfd6 diff --cc back/src/Model/Group.ts index c7971a4,eacd2d0..490b24a --- a/back/src/Model/Group.ts +++ b/back/src/Model/Group.ts @@@ -1,21 -1,16 +1,18 @@@ - import { World } from "./World"; + import { World, ConnectCallback, DisconnectCallback } from "./World"; import { UserInterface } from "./UserInterface"; import {PositionInterface} from "_Model/PositionInterface"; +import {uuid} from "uuidv4"; export class Group { static readonly MAX_PER_GROUP = 4; + private id: string; private users: UserInterface[]; - private connectCallback: (user1: string, user2: string, group: Group) => void; - private disconnectCallback: (user1: string, user2: string, group: Group) => void; + private connectCallback: ConnectCallback; + private disconnectCallback: DisconnectCallback; - constructor(users: UserInterface[], - connectCallback: (user1: string, user2: string, group: Group) => void, - disconnectCallback: (user1: string, user2: string, group: Group) => void - ) { + constructor(users: UserInterface[], connectCallback: ConnectCallback, disconnectCallback: DisconnectCallback) { this.users = []; this.connectCallback = connectCallback; this.disconnectCallback = disconnectCallback;