fix infinite check bug
[rofl0r-oopoker.git] / host.h
blob00162968880860ae6352dfbf2981a5375ab7dfd1
1 /*
2 OOPoker
4 Copyright (c) 2010 Lode Vandevenne
5 All rights reserved.
7 This file is part of OOPoker.
9 OOPoker is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
14 OOPoker is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with OOPoker. If not, see <http://www.gnu.org/licenses/>.
23 #pragma once
25 struct Info;
28 The Host is someone who runs a Game. The Host can stop the game, and receive events from the game.
30 class Host
32 public:
33 virtual ~Host(){}
35 virtual void onFrame() = 0; //called between every player decision
36 virtual void onGameBegin(const Info& info) = 0; //called after all players are sitting at the table, right before the first deal starts
37 virtual void onDealDone(const Info& info) = 0;
38 virtual void onGameDone(const Info& info) = 0; //when the whole tournament is done
40 virtual bool wantToQuit() const = 0;
41 virtual void resetWantToQuit() = 0;