Details | Last modification | View Log | RSS feed
| Rev | Author | Line No. | Line |
|---|---|---|---|
| 99 | pmbaty | 1 | /* |
| 2 | Texel - A UCI chess engine. |
||
| 3 | Copyright (C) 2012-2013 Peter Ă–sterlund, peterosterlund2@gmail.com |
||
| 4 | |||
| 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. |
||
| 9 | |||
| 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 General Public License for more details. |
||
| 14 | |||
| 15 | You should have received a copy of the GNU General Public License |
||
| 16 | along with this program. If not, see <http://www.gnu.org/licenses/>. |
||
| 17 | */ |
||
| 18 | |||
| 19 | /* |
||
| 20 | * humanPlayer.hpp |
||
| 21 | * |
||
| 22 | * Created on: Feb 25, 2012 |
||
| 23 | * Author: petero |
||
| 24 | */ |
||
| 25 | |||
| 26 | #ifndef HUMANPLAYER_HPP_ |
||
| 27 | #define HUMANPLAYER_HPP_ |
||
| 28 | |||
| 29 | #include "player.hpp" |
||
| 30 | |||
| 31 | #include <string> |
||
| 32 | |||
| 33 | |||
| 34 | /** |
||
| 35 | * A player that reads input from the keyboard. |
||
| 36 | */ |
||
| 37 | class HumanPlayer : public Player { |
||
| 38 | public: |
||
| 39 | HumanPlayer(); |
||
| 40 | |||
| 41 | std::string getCommand(const Position& pos, bool drawOffer, const std::vector<Position>& history) override; |
||
| 42 | bool isHumanPlayer() override; |
||
| 43 | void useBook(bool bookOn) override; |
||
| 44 | void timeLimit(int minTimeLimit, int maxTimeLimit) override; |
||
| 45 | void clearTT() override; |
||
| 46 | |||
| 47 | private: |
||
| 48 | std::string lastCmd; |
||
| 49 | }; |
||
| 50 | |||
| 51 | |||
| 52 | inline |
||
| 53 | HumanPlayer::HumanPlayer() { |
||
| 54 | } |
||
| 55 | |||
| 56 | inline bool |
||
| 57 | HumanPlayer::isHumanPlayer() { |
||
| 58 | return true; |
||
| 59 | } |
||
| 60 | |||
| 61 | inline void |
||
| 62 | HumanPlayer::useBook(bool bookOn) { |
||
| 63 | } |
||
| 64 | |||
| 65 | inline void |
||
| 66 | HumanPlayer::timeLimit(int minTimeLimit, int maxTimeLimit) { |
||
| 67 | } |
||
| 68 | |||
| 69 | inline void |
||
| 70 | HumanPlayer::clearTT() { |
||
| 71 | } |
||
| 72 | |||
| 73 | #endif /* HUMANPLAYER_HPP_ */ |