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

20 lines
301 B
JavaScript
Raw Normal View History

2024-04-02 15:57:41 +00:00
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);
}
}