4 Copyright (c) 2010 Lode Vandevenne
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/>.
30 class AI
//interface class, used for bots, but also for human players (then the AI uses human input instead of calculating itself)
38 make a decision for this turn: fold, check, call or raise?
40 virtual Action
doTurn(const Info
& info
) = 0;
44 process events if needed (not required, can be used for extra information)
46 virtual void onEvent(const Event
& event
);
50 called at the end of a deal, only if this AI wasn't required to show his cards.
52 virtual bool boastCards(const Info
& info
);
56 sometimes you get a choice to leave the table. NOTE: in OOPoker this is allowed only for human players. So
57 this function will never be called on non-human AI's, but it's still possible to implement it.
58 Return true if you want to leave the table, false otherwise.
60 virtual bool wantsToLeave(const Info
& info
);
64 This is not the name of the player, but the name of his "type of brains".
66 virtual std::string
getAIName() = 0;