class Player

The class Player represents a player and its associated data More...

Definition#include <ksirk/player.h>
InheritsQObject (unknown) [public ]
Inherited byAIPlayer
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Private Members


Detailed Description

The class Player represents a player and its associated data

 Player (QString &nomPlayer, int nbArmies, Nationality* myNation)

Player

Constructor with simple initializations

int  operator == (Player Arg1)

operator ==

[const virtual]

bit to bit comparison

void  setNbAvailArmies (int nb)

setNbAvailArmies

Accessors to the variables

int  getNbAvailArmies (void)

getNbAvailArmies

void  setNbAttack (int nb)

setNbAttack

int  getNbAttack (void)

getNbAttack

void  setNbDefense (int nb)

setNbDefense

int  getNbDefense (void)

getNbDefense

void  setNbCountries (int nb)

setNbCountries

int  getNbCountries (void)

getNbCountries

void  setName (QString &nomPlayer)

setName

const QString & getName (void)

getName

[const]

void  incrNbAvailArmies (int nb=1)

incrNbAvailArmies

Add/Remove nb armies to the number of available armies (defaults to 1)

void  decrNbAvailArmies (int nb=1)

decrNbAvailArmies

void  incrNbCountries (int nb=1)

incrNbCountries

Add/Remove nb countries to the player (defaults to 1)

void  decrNbCountries (int nb=1)

decrNbCountries

const AnimSprite*  getFlag (void)

getFlag

[const]

const QString&  getFlagFileName (void)

getFlagFileName

[const]

void  actionChoice (GameState state)

actionChoice

[virtual]

This function is called whenever the player should choose an action (attack, defence, etc.). If the player is human, this method do nothing and so is empty. Its inherited version, in AIPlayer will have an activity

bool  isAI (void)

isAI

[const virtual]

Returns false (a Player is not an AI)

QPtrQueue*  getClickedPoints ()

getClickedPoints

[virtual]

Read property of QPtrQueue clickedPoints.

QPtrQueue*  getActionsQueue ()

getActionsQueue

[virtual]

Read property of QPtrQueue actionsQueue.

QString name

name

[private]

int nbCountries

nbCountries

[private]

int nbAvailArmies

nbAvailArmies

[private]

int nbAttack

nbAttack

[private]

int nbDefense

nbDefense

[private]

Nationality * nation

nation

[private]


Generated by: gael on noirdes.limsi.u-psud.fr on Fri Jan 3 17:03:38 2003, using kdoc 2.0a53.