I finished a todo on ensuring the different game server implementations are and stay consistent. I did this by defining a common GameServer trait that takes a generic Variant type; the Variant type needs to be generic because different games may have different server variants. The GameServer trait requires fn spawn and fn server_info to be defined and provides fn run that calls spawn and server_info, setting the AppState’s server info with the result. This ended up making the respective mod.rss more concise and deduplicating some logging code.
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.