gametypes.cpp

来自「一个扑克牌游戏集合的源码,包含了很多基本c-c++语言应用」· C++ 代码 · 共 76 行

CPP
76
字号
//$Id: GameTypes.cpp,v 1.5 2006/08/03 01:36:54 markus Rel $//PROJECT     : Cardgames//SUBSYSTEM   : GameTypes//REFERENCES  ://TODO        ://BUGS        ://REVISION    : $Revision: 1.5 $//AUTHOR      : Markus Schwab//CREATED     : 28.04.2005//COPYRIGHT   : Copyright (C) 2005, 2006// This program is free software; you can redistribute it and/or modify// it under the terms of the GNU General Public License as published by// the Free Software Foundation; either version 2 of the License, or// (at your option) any later version.// This program is distributed in the hope that it will be useful,// but WITHOUT ANY WARRANTY; without even the implied warranty of// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the// GNU General Public License for more details.// You should have received a copy of the GNU General Public License// along with this program; if not, write to the Free Software// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.#include <cardgames-cfg.h>#include <glibmm/convert.h>#include <glibmm/ustring.h>#include "GameTypes.h"GameTypes* GameTypes::instance (NULL);//-----------------------------------------------------------------------------/// Default constructor//-----------------------------------------------------------------------------GameTypes::GameTypes () {#ifdef WITH_ROVHULT   Glib::ustring rovhult (_("Rovhult"));   if (rovhult == "Rovhult") {      try {	 rovhult = Glib::locale_to_utf8 ("R鴙hult");      }      catch (Glib::Error&) {}   }   insert (std::make_pair ((int)ROVHULT, rovhult));#endif#ifdef WITH_TWOPART   insert (std::make_pair ((int)TWOPART, _("Twopart")));#endif#ifdef WITH_HEARTS   insert (std::make_pair ((int)HEARTS, _("Hearts")));#endif#ifdef WITH_BURACO   insert (std::make_pair ((int)BURACO, _("Buraco")));#endif#ifdef WITH_MACHIAVELLI   insert (std::make_pair ((int)MACHIAVELLI, _("Machiavelli")));#endif#ifdef WITH_SGTMAYOR   insert (std::make_pair ((int)SGTMAYOR, _("SgtMayor")));#endif}//-----------------------------------------------------------------------------/// Destructor//-----------------------------------------------------------------------------GameTypes::~GameTypes () {}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?