class Country

* This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. More...

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

Public Methods

Private Members


Detailed Description

* This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * *************************************************************************

 Country (const QString& theName, const QPoint& flagPoint, const QPoint& cannonPoint, const QPoint& cavalryPoint, const QPoint& infantryPoint)

Country

The data used to construct Country object are stored in the ONU @arg theName : the name of the country @arg points : this array stores the number of points that defines the frontier of the country and the coordinates of these points @arg number : the unique numerical id of the country

 ~Country ()

~Country

void  reset (void)

reset

Removes the sprites (flag and soldiers), the owner, etc. The sprites ared deleted.

void  paint (void)

paint

Ask each of the sprites to paint themselves

void  addArmies (BackGnd *backGnd)

addArmies

Creates the sprites necessary to disblay the armies of the country. Eventually removes previously existing sprites.

void  setFlag (const QString& theFlagFileName, BackGnd *backGnd)

setFlag

Creates the sprite of the contry's flag. Eventually removes a previously existing sprite.

bool  communicateWith (const Country *country)

communicateWith

[const]

Test if this is a neighbour of country

void  setOwner (Player *player)

setOwner

Change the owner of this to player

const Player *  getOwner ()

getOwner

[const]

return a pointer to the Player owner of this

Player *  getOwner ()

getOwner

int  getNbArmies (void)

getNbArmies

[const]

Return the number of armies in this country

int  getNbAddedArmies (void)

getNbAddedArmies

Return the number of armies that has been added during the last armies movement

void  setNbArmies (int nb)

setNbArmies

Change the number of armies to nb

void  setNbAddedArmies (int nb)

setNbAddedArmies

Change the number of armies that has been added during the last armies movement to nb

void  incrNbArmies (int nb=1)

incrNbArmies

Add nb armies. Defaults to 1.

void  incrNbAddedArmies (int nb=1)

incrNbAddedArmies

Add nb armies to the number of armies that has been added during the last armies movement. Defaults to 1.

void  decrNbArmies (int nb=1)

decrNbArmies

Remove nb armies. Defaults to 1.

void  decrNbAddedArmies (int nb=1)

decrNbAddedArmies

Remove nb armies to the number of armies that has been added during the last armies movement. Defaults to 1.

const QString  getName (void)

getName

[const]

Return the name of the country

QPoint  getPointFlag (void)

getPointFlag

[const]

Return the point where the flag is displayed

QPoint  getPointCannon (void)

getPointCannon

Return the point where the cannons are displayed

QPoint  getPointCavalry (void)

getPointCavalry

Return the point where the cavalrymen are displayed

QPoint  getPointInfantry (void)

getPointInfantry

Return the point where the infantrymen are displayed

void  setPointFlag (QPoint pt)

setPointFlag

Set the point where the flag is displayed

void  setPointCannon (QPoint pt)

setPointCannon

Set the point where the cannons are displayed

void  setPointCavalry (QPoint pt)

setPointCavalry

Set the point where the cavalrymen are displayed

void  setPointInfantry (QPoint pt)

setPointInfantry

Set the point where the infantrymen are displayed

AnimSpritesListgetSpritesCannons ()

getSpritesCannons

Return the list of cannon sprites

AnimSpritesListgetSpritesCavalry ()

getSpritesCavalry

Return the list of Cavalrymen sprites

AnimSpritesListgetSpritesInfantry ()

getSpritesInfantry

Return the list of Infantrymen sprites

void  setNeighbours (QPtrVector<Country>& neighboursVect)

setNeighbours

QPtrVector< Country >&  getNeighbours (void)

getNeighbours

const QPtrVector< Country >&  getNeighbours (void)

getNeighbours

[const]

Player* belongsTo

belongsTo

[private]

AnimSprite * flag

flag

[private]

unsigned int nbPoints

nbPoints

[private]

int nbArmies

nbArmies

[private]

int nbArmiesAdded

nbArmiesAdded

[private]

QString name

name

[private]

QPtrVector<Country> neighbours

neighbours

[private]

QPoint pointFlag

pointFlag

[private]

QPoint pointCannon

pointCannon

[private]

QPoint pointCavalry

pointCavalry

[private]

QPoint pointInfantry

pointInfantry

[private]

AnimSpritesList * spritesCannons

spritesCannons

[private]

AnimSpritesList * spritesCavalry

spritesCavalry

[private]

AnimSpritesList * spritesInfantry

spritesInfantry

[private]


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