Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

CParticipant Class Reference

PutClassNameHere. More...

#include <Participant.h>

List of all members.

Public Member Functions

 CParticipant ()
 CParticipant.
 ~CParticipant ()
 ~CParticipant
void SetDescription (CDescription desc)
 SetDescription.
CDescription GetDescription () const
 GetDescription.
void SetAI (char *path)
 SetAI.
void SetHuman (char *name)
 SetHuman.
const PARTICIPANT_INFO & GetParticipantInfo ()
 GetParticipantInfo.
bool AssignToResource (CResource *, bool bMobile)
 AssignToResource.
const CResourceGetResource () const
 GetResource.
void AddScore (real32 win, real32 lose, real32 draw)
 AddScore.
void SetScore (real32 win, real32 lose, real32 draw)
 SetScore.
void GetScore (real32 &win, real32 &lose, real32 &draw) const
 GetScore.


Detailed Description

PutClassNameHere.

Description:

Limitations:


Constructor & Destructor Documentation

CParticipant::CParticipant  ) 
 

CParticipant.

Description: Constructor initializes internal class attributes.

Returns:
None
Limitations: None

CParticipant::~CParticipant  ) 
 

~CParticipant

Description: Destructor included for maintenance purposes only.

Returns:
None
Limitations: None


Member Function Documentation

void CParticipant::AddScore real32  win,
real32  lose,
real32  draw
 

AddScore.

Description: This function adds a score to the participant's previous score.

Parameters:
win,: The number of wins
lose,: The number of loses
draw,: The number of draws
Returns:
void
Limitations: None

bool CParticipant::AssignToResource CResource pResource,
bool  bMobile
 

AssignToResource.

Description: Assigns a participant to a resource. This function will add the player to the resource object's participant list. The player, if immobile, cannot be be assigned a new resource. Human players are commonly immobile.

Parameters:
pResource,: The resource to which the participant will be assigned.
bMobile,: The participant's mobility flag. A value of true will allow the participant to be moved later. False will prevent a later relocation.
Returns:
bool: True if the participant was mobile and the assignement was completed successfully, False otherwise.
Limitations: None

CDescription CParticipant::GetDescription  )  const
 

GetDescription.

Description: Fetches the description of the participant.

Returns:
CDescription: The description of the participant.
Limitations: The description must first be set by calling SetDescription

const CParticipant::PARTICIPANT_INFO & CParticipant::GetParticipantInfo  ) 
 

GetParticipantInfo.

Description: This function returns the participant's information.

Returns:
CParticipant::PARTICIPANT_INFO: The info structure.
Limitations: None

const CResource * CParticipant::GetResource  )  const
 

GetResource.

Description: This fuction returns the resource which the player was assigned.

Returns:
CResource*: The pointer to the resource object or NULL if no resource has been assigned to the participant.
Limitations: None

void CParticipant::GetScore real32 &  win,
real32 &  lose,
real32 &  draw
const
 

GetScore.

Description: This function returns the participant's score.

Parameters:
win,: The number of wins
lose,: The number of loses
draw,: The number of draws
Returns:
void
Limitations: None

void CParticipant::SetAI char *  path  ) 
 

SetAI.

Description: Configures the participant as an AI.

Parameters:
path,: The relative path of the AI's module.
Returns:
void
Limitations: None

void CParticipant::SetDescription CDescription  desc  ) 
 

SetDescription.

Description: Associates a description with a participant.

Parameters:
desc,: The description to associate with the participant.
Returns:
void
Limitations: None

void CParticipant::SetHuman char *  name  ) 
 

SetHuman.

Description: Configures the participant as a human player.

Parameters:
name,: A NTL string containing the name of the player.
Returns:
void
Limitations: The name must be less than 255 chars.

void CParticipant::SetScore real32  win,
real32  lose,
real32  draw
 

SetScore.

Description: Sets the player's score.

Parameters:
win,: The number of wins
lose,: The number of loses
draw,: The number of draws
Returns:
void
Limitations: None


The documentation for this class was generated from the following files:
Copyright (c) 2005 Matt Bruns, Pat Hammond, Kevin Markussen, Travis Service, Brain Shaver

SourceForge.net Logo