Get rooms working
This commit is contained in:
parent
c4eece7ffd
commit
85cc6c2f35
9 changed files with 266 additions and 143 deletions
|
@ -100,6 +100,11 @@ impl Client {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Returns (old_room, &new_room)
|
||||
pub fn switch_rooms(&mut self, new_room: Rc<RefCell<Room>>) -> (Rc<RefCell<Room>>, Rc<RefCell<Room>>) {
|
||||
(std::mem::replace(&mut self.room, new_room), self.room.clone())
|
||||
}
|
||||
}
|
||||
|
||||
impl PartialEq for Client {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue