feat(loginSet): limitation des salons en fonction des loginSet

This commit is contained in:
Emi Boucly 2025-01-29 22:58:59 +01:00
parent 6daa8c2fad
commit 58093d48a4
3 changed files with 47 additions and 4 deletions

View file

@ -1,5 +1,6 @@
package rtgre.modeles;
import java.util.HashSet;
import java.util.TreeMap;
public class RoomMap extends TreeMap<String, Room> {
@ -13,4 +14,39 @@ public class RoomMap extends TreeMap<String, Room> {
this.add(new Room("#ducks"));
this.add(new Room("#mice"));
}
public void setLoginSets() {
HashSet<String> juniors = new HashSet<>();
juniors.add("riri");
juniors.add("fifi");
juniors.add("loulou");
this.get("#juniors").setLoginSet(juniors);
HashSet<String> ducks = new HashSet<>();
ducks.add("riri");
ducks.add("fifi");
ducks.add("loulou");
ducks.add("donald");
ducks.add("daisy");
ducks.add("picsou");
this.get("#ducks").setLoginSet(ducks);
HashSet<String> mice = new HashSet<>();
mice.add("mickey");
mice.add("minnie");
this.get("#mice").setLoginSet(mice);
HashSet<String> all = new HashSet<>();
all.add("riri");
all.add("fifi");
all.add("loulou");
all.add("donald");
all.add("daisy");
all.add("picsou");
all.add("mickey");
all.add("minnie");
all.add("dingo");
this.get("#all").setLoginSet(all);
}
}