[Freeciv-Dev] Re: (PR#725) Order of end/new-turn activities
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=725 >
One other complication.
At some point we want synchronous player turns. For this to work we
need a loop that is logically like
do {
begin_turn()
players_iterate {
begin_player_turn();
do_player_turn();
end_player_turn();
}
end_turn();
}
now in this case I have some questions.
- (design) Which actions should be done in begin_turn and which in
begin_player_turn? City production? Unit (goto) movement? IMO both
should go into begin_player_turn().
- (technical) How do we have this loop coincide with the loop we have
now, which is
do {
begin_turn()
begin_all_players_turns();
do_all_players_turns();
end_all_players_turns();
end_turn();
}
maybe we can pass NULL to begin_player_turn to mean it is to be done for
all players. Then a dummy loop can either loop over all players
(shuffled as needed) or just the one player.
- In this case we probably only want to shuffle once, at the beginning
of the game. After that everything proceeds in order. This means the
shuffled order must be put into the savegame. This should be done
anyway since currently players are re-shuffled on loading meaning games
aren't identical after a save+load.
This probably isn't all that hard if we think about it in advance.
jason
|
|