PaperBeetle
Emperor
IIRC the turn correctly, I moved units next to Delhi while we were at peace, and there was only a warrior there. During the IBT, Ghandi gave me the "leave or declare" - I declared. When it was my turn again, there was an unfortified spearman in Delhi and 1 less citizen.
If the player whipped something, it wouldn't be ready until his next turn - he couldn't have it before the AI moved again. My guess is that in the turn order, "diplomacy" comes before commerce, food, and shields (similar to the way it is in multiplayer), and once the player declares the AI breaks into the build sequence and whips a spear (cheater!!!).
The AI doesn't have to cheat for this one. It is just a direct consequence of the turn order, the flipside of the player getting first refusal on the Philosophy slingshot and on wonder builds, if you like.
The turn order is:
1) Human player gets to move his units and look in his towns and advisors. I call this the player's mainturn. It ends when you hit "end turn".
2*) Your worker turns get applied, e.g. any workers which were still toiling when you hit end turn, but had a status of "1 turn to complete" finish their work.
3) The first AI (righmost on the graphs) gets his or her mainturn.
4) And so on through all the AI players, moving from right to left across the graphs. It is during his mainturn that Gandhi gave you that boot order. After you dowed, he went into his town and used the whip. Perfectly reasonable behaviour, no cheating.
5) The interturn starts. The human player's empire is considered first, which is why you always beat the AI to techs and wonders to which you are both 1 turn to complete.
5.1) Empire-wide, cash is added to your treasury, and beakers are added to your research project. If you get a tech, you can break into the interturn to speak to your advisors. You can sell new techs to AI even if, as a result of your getting the tech, their research is now (before their new beakers are added) at more than 100%, and that is how this thread started, iirc? The interturn will resume when you leave the advisors.
5.2) Town by town, the game checks the happiness situation, applying a riot if necessary. If the town is not rioting, food is added to the food box. If the food box is full, a new citizen is created and placed by the governor. If the town is not rioting, shields are added to the shield box. If the shield box is full, the building or unit is created.
5.3) Culture is added to your towns (so any cultural buildings just completed in 5.2 get culture this turn) and if necessary borders are popped, which triggers the governor to reassign your citizens (so this reassignment has no immediate effect, as your citizens have done their work for this turn).
6) The first AI gets his or her interturn. Then the second AI, etc. It is during his interturn that Gandhi's new unit was created.
7) The date is incremented, and we go back to step 1.
So the upshot is that because you are player #1, between a consecutive pair of your mainturns, every AI gets a mainturn and later an interturn, allowing it to rush units in time to defend against your approaching units. AI #7 probably goes on the forums and makes the same complaint about AI #8 rushing units...
So now let's think of a strat which you can do that the AI can't (apart from the much-used interturn tech trading). Between a consecutive pair of each AI's mainturns, you get an interturn and later a mainturn. So suppose an AI moves attackers next to your undefended (and unreachable) town. Normally, there is nothing much you can do to defend it. But if you have 1 turn to go on a tech, you can get into that town during the interturn, rush an attacker, and then during your mainturn you can take a crack at the AI unit.
* Okay, I'm not quite sure whether worker turns are added at the end of your mainturn, or at some point during your interturn. Probably the latter actually.