(&mut self, obj: String, room: &mut Room)
| 51 | } |
| 52 | |
| 53 | fn take(&mut self, obj: String, room: &mut Room) { |
| 54 | if room.objects.contains(&obj) { |
| 55 | room.objects.remove(&obj); |
| 56 | self.backpack.insert(obj); |
| 57 | } else { |
| 58 | println!("not found {}", obj); |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | fn drop(&mut self, obj: String, room: &mut Room) { |
| 63 | if self.backpack.contains(&obj) { |