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... |
|
|
Public Methods
Private Members
*
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
Removes the sprites (flag and soldiers), the owner, etc.
The sprites ared deleted.
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
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
Return the list of cannon sprites
Return the list of Cavalrymen sprites
Return the list of Infantrymen sprites
void setNeighbours (QPtrVector<Country>& neighboursVect)
| setNeighbours |
QPtrVector< Country >& getNeighbours (void)
| getNeighbours |
const QPtrVector< Country >& getNeighbours (void)
| getNeighbours |
[const]
[private]
[private]
unsigned int nbPoints
| nbPoints |
[private]
[private]
int nbArmiesAdded
| nbArmiesAdded |
[private]
[private]
QPtrVector<Country> neighbours
| neighbours |
[private]
QPoint pointFlag
| pointFlag |
[private]
QPoint pointCannon
| pointCannon |
[private]
QPoint pointCavalry
| pointCavalry |
[private]
QPoint pointInfantry
| pointInfantry |
[private]
[private]
[private]
[private]
Generated by: gael on noirdes.limsi.u-psud.fr on Fri Jan 3 17:03:38 2003, using kdoc 2.0a53. |