WorldInitialized.fromMode constructor

WorldInitialized.fromMode(
  1. PackItem<GameMode>? mode,
  2. WorldState state
)

Implementation

factory WorldInitialized.fromMode(
  PackItem<GameMode>? mode,
  WorldState state,
) => WorldInitialized(
  clearUserInterface: true,
  info: state.info.copyWith(
    teams: mode?.item.teams ?? {},
    gameMode: mode?.location,
  ),
  table: mode?.item.tables[state.tableName] ?? GameTable(),
  teamMembers: const {},
);