Initializes the game world and creates a new controller for the manager to interact with it. DO NOT CALL THIS FUNCTION UNLESS YOU ARE THE MANAGER!
(map: GameMap)
| 1076 | /// |
| 1077 | /// DO NOT CALL THIS FUNCTION UNLESS YOU ARE THE MANAGER! |
| 1078 | pub fn new_manager(map: GameMap) -> GameController { |
| 1079 | let world = GameWorld::new(map); |
| 1080 | GameController { |
| 1081 | world: world.clone(), |
| 1082 | old_world: world, |
| 1083 | config: Config::runner_config(), |
| 1084 | turn: TurnMessage { changes: vec![] }, |
| 1085 | stream: None, |
| 1086 | player_key: None, |
| 1087 | time_left_ms: None, |
| 1088 | } |
| 1089 | } |
| 1090 | |
| 1091 | /// The start turn message to send to the first player to move. Should |
| 1092 | /// only be called on Round 1, and should only be sent to Red Earth. |