The server should be refactored into a separate module that can be started standalone (e.g. with a command line option) or alongside the main game (hosting on-the-fly when starting a network game).
This means that every game instance in a multiplayer game is in fact a client, with one client connecting to the local server it spawned in a separate thread.
The server should be refactored into a separate module that can be started standalone (e.g. with a command line option) or alongside the main game (hosting on-the-fly when starting a network game). This means that every game instance in a multiplayer game is in fact a client, with one client connecting to the local server it spawned in a separate thread.