1 // Copyright (C) 2003, 2004, 2005 Ulf Lorenz
2 // Copyright (C) 2007, 2008 Ben Asselstine
3 // Copyright (C) 2007, 2008 Ole Laursen
5 // This program is free software; you can redistribute it and/or modify
6 // it under the terms of the GNU General Public License as published by
7 // the Free Software Foundation; either version 3 of the License, or
8 // (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU Library General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 #include "playerlist.h"
24 #define debug(x) {cerr<<__FILE__<<": "<<__LINE__<<": "<<x<<flush<<endl;}
27 NextTurn::NextTurn(bool turnmode, bool random_turns)
28 :d_turnmode(turnmode), d_random_turns (random_turns), d_stop(false)
30 continuing_turn = false;
32 Player *active = Playerlist::getActiveplayer();
33 abort = srequestAbort.connect(sigc::mem_fun(active, &Player::abortTurn));
42 void NextTurn::nextPlayer()
44 Playerlist::getInstance()->nextPlayer();
45 Player *active = Playerlist::getActiveplayer();
48 abort = srequestAbort.connect(sigc::mem_fun(active, &Player::abortTurn));