- adding empty constructor for History

This commit is contained in:
Antoine Fraboulet 2005-12-26 19:17:49 +00:00
parent 8f605110b7
commit 983d413a3b
2 changed files with 12 additions and 7 deletions

View file

@ -30,23 +30,29 @@
#include "turn.h"
Turn::Turn()
{
m_num = 0;
m_player = 0;
m_pldrack = PlayedRack();
m_round = Round();
}
Turn::Turn(int iNum, int iPlayerId,
const PlayedRack& iPldRack, const Round& iRound)
: m_num(iNum), m_playerId(iPlayerId), m_pldrack(iPldRack), m_round(iRound)
{
}
#if 0
void Turn::operator=(const Turn &iOther)
{
num = iOther.num;
pldrack = iOther.pldrack;
round = iOther.round;
m_num = iOther.m_num;
m_pldrack = iOther.m_pldrack;
m_round = iOther.m_round;
}
#endif
string Turn::toString(bool iShowExtraSigns) const
{
string rs = "";

View file

@ -30,16 +30,15 @@
class Turn
{
public:
Turn();
Turn(int iNum, int iPlayerId,
const PlayedRack& iPldRack, const Round& iRound);
virtual ~Turn() {};
#if 0
void setNum(int iNum) { m_num = iNum; }
void setPlayer(int iPlayerId) { m_playerId = iPlayerId; }
void setPlayedRack(const PlayedRack& iPldRack) { m_pldrack = iPldRack; }
void setRound(const Round& iRound) { m_round = iRound; }
#endif
int getNum() const { return m_num; }
int getPlayer() const { return m_playerId; }