Blaze-Brigade  Rev1
Model.Player Class Reference

Represents a Player in the game. More...

Public Member Functions

 Player ()
 
LinkedList< UnitgetUnits ()
 
int getNumOfUnits ()
 
bool ownsUnit (Unit unit)
 
void addUnit (Unit unit)
 
void removeUnit (Unit unit)
 

Detailed Description

Represents a Player in the game.

Holds information pertaining to a Player in the game.

Constructor & Destructor Documentation

§ Player()

Model.Player.Player ( )

Creates a player. Initializes a list of player owned units.

Member Function Documentation

§ addUnit()

void Model.Player.addUnit ( Unit  unit)

Adds the specified unit to the player's units.

Parameters
unitUnit to be added.

§ getNumOfUnits()

int Model.Player.getNumOfUnits ( )

Returns the total number of player owned units.

§ getUnits()

LinkedList<Unit> Model.Player.getUnits ( )

Returns all player owned units.

§ ownsUnit()

bool Model.Player.ownsUnit ( Unit  unit)

Indicates whether the player owns the specified unit.

Parameters
unitSpecified unit.

§ removeUnit()

void Model.Player.removeUnit ( Unit  unit)

Removes the specified unit from the player's units.

Parameters
unitUnit to be removed.

The documentation for this class was generated from the following file: