Off-Topic:
Let's say someone might need to find, for example, the Warlock Barok or the Barbarian Jacqueline (whichever comes first).
Currently, the program doesn't allow you to do that.
I just thought it was unnecessary.
Well, actually, sometimes it is necessary, for example, at the beginning of the game, to "scan" all heroes.
I will probably add this function to the program a little later.
And let Mantic0re go his own way, I wish him luck in this. ;)
Therefore, Manticore is right about the algorithm...besides, it is very easy to implement - the save file is not encoded, the structure is simple...start by creating a list of heroes - who is in taverns (with whom), who is free, and who has what army.