triplea-game / triplea

TripleA is a turn based strategy game and board game engine, similar to Axis & Allies or Risk.
https://triplea-game.org/
GNU General Public License v3.0
1.34k stars 393 forks source link

Bots: 'exit on game end' & automatically load last autosave on boot #12733

Closed DanVanAtta closed 2 months ago

DanVanAtta commented 2 months ago
(1) Adds a flag to "exit on game end". This means instead of going
to the staging screen, the bot instance instead shuts down.

(2) On bot startup, bot will load 'autosave.tsvg' automatically if it exists.

The exit on shutdown relies on the system to automatically restart
a service that is no longer running. Thus, the bot service should
be automatically brought back up if that is in place.

There is a problem currently where bots are not returning
to the staging screen when the last player has left. While this
update does not fix that problem, setting the 'exit on end'
flag would be a workaround.

Further, having the bot restart is particularly useful as that
picks up any new or updated maps. Otherwise it can be hard
to manually find a good time to restart all bots.