From 983d413a3bf7455342bcbc1ad5f843b9da22e37a Mon Sep 17 00:00:00 2001 From: Antoine Fraboulet Date: Mon, 26 Dec 2005 19:17:49 +0000 Subject: [PATCH] - adding empty constructor for History --- game/turn.cpp | 16 +++++++++++----- game/turn.h | 3 +-- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/game/turn.cpp b/game/turn.cpp index 7335536..145ffe8 100644 --- a/game/turn.cpp +++ b/game/turn.cpp @@ -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 = ""; diff --git a/game/turn.h b/game/turn.h index 2065c26..822faac 100644 --- a/game/turn.h +++ b/game/turn.h @@ -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; }