1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
extern crate base;
extern crate rand;
#[macro_use]
extern crate glium;
extern crate noise;
#[macro_use]
extern crate log;
mod camera;
mod config;
mod game;
mod game_context;
mod ghost;
mod renderer;
mod weather;
mod world;
mod world_manager;
mod event_manager;
mod frustum;
pub mod view;
pub mod util;
pub mod daytime;
mod player;
mod control_switcher;
pub use daytime::*;
pub use camera::Camera;
pub use config::Config;
pub use event_manager::*;
pub use game_context::GameContext;
pub use renderer::Renderer;
pub use world_manager::WorldManager;
pub use frustum::Frustum;
pub use frustum::LOCATION;
pub use frustum::SimpleCull;
use game::Game;
use std::net::SocketAddr;
use std::error::Error;
pub fn start_game(config: Config, server: SocketAddr) -> Result<(), Box<Error>> {
let game = try!(Game::new(config, server));
game.run()
}