Source: ksirk/continent.h


Annotated List
Files
Globals
Hierarchy
Index
/***************************************************************************
                          continent.h  -  description
                             -------------------
    begin                : sam sep 7 2002
    copyright            : (C) 2002 by Gael de Chalendar
    email                : ksirk@tuxfamily.org
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef CONTINENT_H
#define CONTINENT_H

#include "country.h"

#include 

/**This class represents the continents of the world. Each country belongs to a continent. When a player owns all the countries of a continent, he wins more armies. It is the basic object on which the strategies are funded.
  *@author Gael de Chalendar
  */

class Continent : public QObject
{
	Q_OBJECT
public: 
	Continent();
	~Continent();

	/**
	  * Read property of QList members.
	  */
	virtual const QList& getMembers();

	/** The constructor-initializer */
	Continent (const QString &myName, const QList& myCountries, const int myBonus );

	/** Read property of QString name. */
	virtual const QString& getName();

	/** Read property of int bonus. */
	virtual const int& getBonus();

	/** Returns the player that owns all the countries of this continent. 0 if none. */
	const Player* owner(void);

private: // Private attributes

	/** This is the list of the countries that forms this continent. This member
	  * is constant as it will not change during the game.
	  */
	QPtrList members;

	/** The name of the continent */
	const QString name;

	/** The bonus armies got by a user that owns all this continent */
	const int bonus;
};


#endif

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