Merge branch 'event_group' into webrtc
authorgparant <g.parant@thecodingmachine.com>
Sun, 3 May 2020 14:18:05 +0000 (16:18 +0200)
committergparant <g.parant@thecodingmachine.com>
Sun, 3 May 2020 14:18:05 +0000 (16:18 +0200)
# Conflicts:
# back/src/Model/Group.ts
# back/src/Model/World.ts

1  2 
back/src/Model/Group.ts

index c7971a4be22412d5c086e541978dea920966a7ff,eacd2d032d89a6fd65c50ad2526a254a41737428..490b24a809a57007b9eab7a29f440638736ee199
@@@ -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;