2 Copyright (c) 2006 Paolo Capriotti <p.capriotti@gmail.com>
3 (c) 2006 Maurizio Monge <maurizio.monge@kdemail.net>
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 2 of the License, or
8 (at your option) any later version.
11 #ifndef GNUSHOGIENGINE_H
12 #define GNUSHOGIENGINE_H
17 class IMoveSerializer
;
21 * @brief A shogi engine compatible with gnushogi.
23 * @note This code is partially stolen from the XBoard engine class
25 class GNUShogiEngine
: public Engine
{
50 IMoveSerializer
* m_serializer
;
52 static QRegExp m_move_pattern
;
55 * Initialize the engine.
57 virtual void initializeEngine();
60 * Parse engine command line and the appropriate
63 void processCommand(const QString
& command
);
66 * Create an gnushogi compatible engine.
68 GNUShogiEngine(Components
* components
,
70 const QStringList
& arguments
);
73 * Terminate the engine.
75 virtual ~GNUShogiEngine();
78 * Send a move to the engine.
80 virtual void sendMove(const Move
& move
, const StatePtr
& ref
);
84 * @param pos The position before the move. Used if the engine
85 * does not support the undo command.
87 virtual void backUp(const StatePtr
& pos
);
89 virtual void setBoard(const StatePtr
& pos
);
107 virtual void startAnalysis();
108 virtual void stopAnalysis();
111 #endif // GNUSHOGIENGINE_H