This repository has been archived on 2025-03-10. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
wetsock/lib/WetSock/Models/Room.js
2024-04-02 23:24:31 +00:00

20 lines
301 B
JavaScript

export default class Room {
constructor(data) {
this.id = data.id;
this.name = data.name;
this.users = new Set();
}
addUser(userId) {
this.users.add(userId);
}
removeUser(userId) {
this.users.delete(userId);
}
getUsers() {
return Array.from(this.users);
}
}