EscapeGame constructor
EscapeGame({})
Creates a new EscapeGame instance.
Implementation
EscapeGame({
Inventory? inventory,
Iterable<Room>? rooms,
String? firstRoomId,
this.countdown,
}) : assert(rooms != null && rooms.isNotEmpty),
rooms = HashSet.from(rooms!),
inventory = inventory ?? Inventory(),
_currentRoom = firstRoomId ?? rooms.first.id {
this.inventory.addListener(notifyListeners);
}