class AIPlayer

This class represents a computer player. More...

Definition#include <ksirk/aiplayer.h>
InheritsPlayer [public ], QThread (unknown) [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Signals

Private Methods

Private Members


Detailed Description

This class represents a computer player. It holds all strategic routines

 ~AIPlayer ()

~AIPlayer

 AIPlayer (QString & nomPlayer, int nbArmies, Nationality * myNation,PlayersArray* players, ONU* world, KGameWindow* game )

AIPlayer

Constructor with simple initializations

int  operator == (AIPlayer Arg1)

operator ==

[virtual]

bit to bit comparison

Reimplemented from Player.

void  actionChoice (GameState state)

actionChoice

[virtual]

This function is called whenever the player should choose an action ( attack, defence, etc.). It has the responsability to choose the correct action depending on the state of the game.

Reimplemented from Player.

QPtrList<Country>  countries (void)

countries

[const]

Returns the list of the countries owned by this player

bool  isAI ()

isAI

[const virtual]

Returns true (an AIPlayer is an AI)

Reimplemented from Player.

void  run (void)

run

[virtual]

QPtrQueue*  getClickedPoints ()

getClickedPoints

[virtual]

Read property of QPtrQueue clickedPoints.

Reimplemented from Player.

QPtrQueue*  getActionsQueue ()

getActionsQueue

[virtual]

Read property of QPtrQueue ationsQueue.

Reimplemented from Player.

void  chooseAttackMoveArmiesOrNextPlayer (void)

chooseAttackMoveArmiesOrNextPlayer

Chooses the next action. In the current basic setting, chooses at random between the three possibilities. For each, chooses randomly the parameters.If the randomly choosen parameters end by an impossible action, continue with next player.

void  stop (void)

stop

PlayersArray* allPlayers

allPlayers

[private]

ONU* theWorld

theWorld

[private]

KGameWindow* theGame

theGame

[private]

QPtrQueue clickedPoints

clickedPoints

[private]

QPtrQueue actionsQueue

actionsQueue

[private]

bool stopMe

stopMe

[private]

Country*  chooseReceivingCountry (void)

chooseReceivingCountry

[private]

Chooses a country to receive a new army in dotation

std::pair< const Country*, const Country* >  chooseBelligerant (void)

chooseBelligerant

[private const]

void  actionAtPoint (const QPoint &p)

actionAtPoint

[signal]