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
20 * @brief A shogi engine compatible with gnushogi.
22 * @note This code is partially stolen from the XBoard engine class
24 class GNUShogiEngine
: public Engine
{
50 static QRegExp m_move_pattern
;
53 * Initialize the engine.
55 virtual void initializeEngine();
58 * Parse engine command line and the appropriate
61 void processCommand(const QString
& command
);
64 * Create an gnushogi compatible engine.
66 GNUShogiEngine(const QString
& path
, const QStringList
& arguments
);
69 * Terminate the engine.
71 virtual ~GNUShogiEngine();
74 * Send a move to the engine.
76 virtual void sendMove(AbstractMove::Ptr move
, AbstractPosition::Ptr ref
);
80 * @param pos The position before the move. Used if the engine
81 * does not support the undo command.
83 virtual void backUp(AbstractPosition::Ptr pos
);
85 virtual void setBoard(AbstractPosition::Ptr pos
, int halfmove
, int fullmove
);
103 virtual void startAnalysis();
104 virtual void stopAnalysis();
107 #endif // GNUSHOGIENGINE_H