partey_workadventure/back/src/Model/Group.ts

18 lines
414 B
TypeScript
Raw Normal View History

2020-04-07 10:08:04 +02:00
import {MessageUserPosition} from "./Websocket/MessageUserPosition";
export class Group {
static readonly MAX_PER_GROUP = 4;
users: MessageUserPosition[];
constructor(users: MessageUserPosition[]) {
this.users = users;
}
getUsers(): MessageUserPosition[] {
return this.users;
}
isFull(): boolean {
return this.users.length >= Group.MAX_PER_GROUP;
}
}