And one more post, in a last ditch attempt to not have to go write a really boring report thing - this is all based on there only ever being two players.
It's good practise to write more modular code that can be used for other purposes - for this example, multi-player turn-based switching can be done with very little extra work:
code:
function switchCurrentPlayer()
{
currentPlayer++
if ( currentPlayer > PlayerCount )
{
currentPlayer=1
}
}
Set PlayerCount to any number, and this will cycle through them in order, whether there is 2 or 20 players.
(The "++" just means "add one")
Anyway, I better get on with wasting time doing what I'm supposed to be doing right now.
:(