GRA RPG  DM & KK
Projekt na PO3
Fight Class Reference

Class support fighting between player vs monster or player vs player. More...

#include <Fight.h>

Public Member Functions

 Fight ()
 Default constructor class Fight. More...
 
 Fight (Champion *c1, Champion *c2)
 Constructor Class Fight

Parameters
c1- pointer to first character
c2- pointer of second character
Returns
More...
 
 ~Fight ()
 Destructor class Fight. More...
 
void heal (const Champion *const champ)
 Function set health. More...
 
void startFigft ()
 Function starts fight between characters. More...
 
string getChamp1 ()
 Get health from first character. More...
 
string getChamp2 ()
 Get health from second character. More...
 

Friends

std::ostream & operator<< (std::ostream &out, const Fight &p)
 

Detailed Description

Class support fighting between player vs monster or player vs player.

Constructor & Destructor Documentation

◆ Fight() [1/2]

Fight::Fight ( )
inline

Default constructor class Fight.

◆ Fight() [2/2]

Fight::Fight ( Champion c1,
Champion c2 
)
inline

Constructor Class Fight

Parameters
c1- pointer to first character
c2- pointer of second character
Returns

◆ ~Fight()

Fight::~Fight ( )
inline

Destructor class Fight.

Member Function Documentation

◆ getChamp1()

string Fight::getChamp1 ( )
inline

Get health from first character.

Returns
Health as String

◆ getChamp2()

string Fight::getChamp2 ( )
inline

Get health from second character.

Returns
Health as String

◆ heal()

void Fight::heal ( const Champion *const  champ)

Function set health.

Parameters
champ- Basic helth champion


◆ startFigft()

void Fight::startFigft ( )

Function starts fight between characters.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  out,
const Fight p 
)
friend