safe_ptr<player>_server_player;///< the player that the server controls
safe_ptr<player>_client_player;///< the player that this client controls, if this game is a client
random_generator_random;
context_context;
type_database_type_database;
enum{
test_connection_identifier_token=0xBEEF,
};
/// Constructor for test_game, determines whether this game will be a client or a server, and what addresses to bind to and ping. If this game is a server, it will construct 50 random _buildings and 15 random AI _players to populate the "world" with. test_game also constructs an AsymmetricKey to demonstrate establishing secure connections with clients and servers.
logprintf("Destroyed a %s...",(this->_is_server?"server":"client"));
}
type_database*get_type_database()
{
return&_type_database;
}
/// Called periodically by the platform windowing code, tick will update all the _players in the simulation as well as tick() the game's network interface.