Export everything to dbus
There should be 2 new command-lines: --dbus-server: starts a D-Bus service that will create a random game, print its bus name, play and exit when killed. It has a Main object to create new games, in which case it returns references to Seats (one for each player) with non-discoverable random names. At startup, it prints its bus name. If not anonymous, it runs as a daemon; --dbus-ai: starts a service that will fill server seats on demand. It has a Main object that can fill new seats.
These are accompanied with --bus-name=... to claim a well-known name. Otherwise, an anonymous name is given.
These share the Seat interface. It has:
- signals: event_setup, event_deal, event_bid, event_decl, event_call, event_dog, event_discard, event_handful, event_play, next (you're next), end (with score), deleted (e.g. timeout);
- methods: bid, decl, call, discard, play.
There is a Server interface. It has:
- methods: create_random (with given seed): creates a random game, register the seats and return the list of seat names.
Finally, there is an Ai interface. It has:
- methods: run (with bus name and seat name): connect to the server and play that player.
Add a check to create and run a game anonymously.