rust/lib-hedgewars-engine/src/instance.rs
branchtransitional_engine
changeset 16051 2003b466b279
parent 15954 9502611bffc1
parent 16046 e8afb1bf2779
equal deleted inserted replaced
16050:6a3dc15b78b9 16051:2003b466b279
    33 
    33 
    34             template
    34             template
    35         }
    35         }
    36 
    36 
    37         world.init(template());
    37         world.init(template());
       
    38         world.init_renderer();
    38 
    39 
    39         Self {
    40         Self {
    40             world,
    41             world,
    41             ipc_channel: Channel::new(),
    42             ipc_channel: Channel::new(),
    42             ipc_queue: MessagesQueue::new(QueueChatStrategy::LocalGame),
    43             ipc_queue: MessagesQueue::new(QueueChatStrategy::LocalGame),
    70         let messages: Vec<EngineMessage> = self.ipc_queue.iter(0).collect();
    71         let messages: Vec<EngineMessage> = self.ipc_queue.iter(0).collect();
    71 
    72 
    72         for message in messages {
    73         for message in messages {
    73             println!("Processing message: {:?}", message);
    74             println!("Processing message: {:?}", message);
    74             match message {
    75             match message {
    75                 Unknown => println!("Unknown message"),
    76                 Unknown(data) => println!("Unknown message: {:?}", data),
    76                 Empty => println!("Empty message"),
    77                 Empty => println!("Empty message"),
    77                 Synced(_, _) => unimplemented!(),
    78                 Synced(_, _) => unimplemented!(),
    78                 Unsynced(_) => unimplemented!(),
    79                 Unsynced(_) => unimplemented!(),
    79                 Unordered(unordered_message) => self.process_unordered_message(&unordered_message),
    80                 Unordered(unordered_message) => self.process_unordered_message(&unordered_message),
    80                 Config(config_message) => self.process_config_message(&config_message),
    81                 Config(config_message) => self.process_config_message(&config_message),