pub fn init_world<'a, 'b>() -> (World, Dispatcher<'a, 'b>) {
    let mut config = Config::default();
    config.server.port = find_open_port().unwrap();

    let config = Arc::new(config);

    let player_count = Arc::new(PlayerCount(AtomicUsize::new(0)));
    let server_icon = Arc::new(None);
    let ioman = super::init_io_manager(
        Arc::clone(&config),
        Arc::clone(&player_count),
        Arc::clone(&server_icon),
    );
    let level = LevelData::default();

    let (mut world, dispatcher) = super::init_world(config, player_count, ioman, level);
    register_components(&mut world);
    (world, dispatcher)
}
/// Initializes a Specs world and dispatcher
/// using default configuration options and an
/// available server port.
Initializes a Specs world and dispatcher
using default configuration options and an
available server port.
Initializes a Specs world and dispatcher using default configuration options and an available server port .
pub fn init_world<'a, 'b>() -> (World, Dispatcher<'a, 'b>) {
    let mut config = Config::default();
    config.server.port = find_open_port().unwrap();
    let config = Arc::new(config);
    let player_count = Arc::new(PlayerCount(AtomicUsize::new(0)));
    let server_icon = Arc::new(None);
    let ioman = super::init_io_manager(
        Arc::clone(&config),
        Arc::clone(&player_count),
        Arc::clone(&server_icon),
    );
    let level = LevelData::default();
    let (mut world, dispatcher) = super::init_world(config, player_count, ioman, level);
    register_components(&mut world);
    (world, dispatcher)
}
pub fn init_world < ' a , ' b > ( ) -> ( World , Dispatcher < ' a , ' b > ) { let mut config = Config :: default ( ) ; config . server . port = find_open_port ( ) . unwrap ( ) ; let config = Arc :: new ( config ) ; let player_count = Arc :: new ( PlayerCount ( AtomicUsize :: new ( 0 ) ) ) ; let server_icon = Arc :: new ( None ) ; let ioman = super :: init_io_manager ( Arc :: clone ( & config ) , Arc :: clone ( & player_count ) , Arc :: clone ( & server_icon ) , ) ; let level = LevelData :: default ( ) ; let ( mut world , dispatcher ) = super :: init_world ( config , player_count , ioman , level ) ; register_components ( & mut world ) ; ( world , dispatcher ) }
Initializes a Specs world and dispatcher
using default configuration options and an
available server port.
Initializes a Specs world and dispatcher using default configuration options and an available server port .