turn.cpp

Go to the documentation of this file.
00001 /* Eliot                                                                     */
00002 /* Copyright (C) 1999  Antoine Fraboulet                                     */
00003 /*                                                                           */
00004 /* This file is part of Eliot.                                               */
00005 /*                                                                           */
00006 /* Eliot is free software; you can redistribute it and/or modify             */
00007 /* it under the terms of the GNU General Public License as published by      */
00008 /* the Free Software Foundation; either version 2 of the License, or         */
00009 /* (at your option) any later version.                                       */
00010 /*                                                                           */
00011 /* Eliot is distributed in the hope that it will be useful,                  */
00012 /* but WITHOUT ANY WARRANTY; without even the implied warranty of            */
00013 /* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             */
00014 /* GNU General Public License for more details.                              */
00015 /*                                                                           */
00016 /* You should have received a copy of the GNU General Public License         */
00017 /* along with this program; if not, write to the Free Software               */
00018 /* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
00019 
00020 /**
00021  *  \file   turn.cpp
00022  *  \brief  Game turn (= id + pldrack + round)
00023  *  \author Antoine Fraboulet
00024  *  \date   2005
00025  */
00026 
00027 #include <string>
00028 #include "pldrack.h"
00029 #include "round.h"
00030 #include "turn.h"
00031 
00032 
00033 Turn::Turn()
00034 {
00035     m_num      = 0;
00036     m_playerId = 0;
00037     m_pldrack  = PlayedRack();
00038     m_round    = Round();
00039 }
00040 
00041 Turn::Turn(int iNum, int iPlayerId,
00042            const PlayedRack& iPldRack, const Round& iRound)
00043     : m_num(iNum), m_playerId(iPlayerId), m_pldrack(iPldRack), m_round(iRound)
00044 {
00045 }
00046 
00047 #if 0
00048 void Turn::operator=(const Turn &iOther)
00049 {
00050     m_num      = iOther.m_num;
00051     m_playerId = iOther.m_playerId;
00052     m_pldrack  = iOther.m_pldrack;
00053     m_round    = iOther.m_round;
00054 }
00055 #endif
00056 
00057 string Turn::toString(bool iShowExtraSigns) const
00058 {
00059     string rs = "";
00060     if (iShowExtraSigns)
00061     {
00062         rs = ""; // TODO
00063     }
00064     rs = rs + m_pldrack.toString() + " " + m_round.toString();
00065     return rs;
00066 }
00067 
00068 /// Local Variables:
00069 /// mode: c++
00070 /// mode: hs-minor
00071 /// c-basic-offset: 4
00072 /// indent-tabs-mode: nil
00073 /// End:

Generated on Thu Dec 29 02:01:14 2005 for Eliot by  doxygen 1.4.5