CTurnGame

From Project X Wiki
Jump to: navigation, search

Worms Armageddon class

Class name: CTurnGame
Description: Contains general game routines and fields
Constructor: Not Available
Derived From: CObject


Contains general game routines and fields. Global instance : Root

Fields

CTurnGame : CObject
{
   int       NextColor;   
   int       NextTeam[6]; 
   int       CurTeamB;   
   int       CurWorm;    
   int       CurTeam;   
   bool       TimerDisabled; 
   int       RetreatTimer;   
};

NextColor - index of next team. Can be outside of (1..6) or point to dead team.
NextTeam[6] - array of next worm for each team.
CurTeam - index (1..6) of team what does turn. Can be 0 in middle-turn
CurWorm - index (1..8) of worm what does turn. Can be 0 in middle-turn
TimerDisabled - true, if timer of turn is stopped
RetreatTimer - counts time before end of retreat stage. (after shoot of weapon)


Methods

void SetCurrentTeam(int Team);

Sets current team to Team(1..6)

int GetNextTeam();

Returns valid index of team which will be used for the next turn. Note, that GetNextTeam works twice before each turn.