2 Copyright (c) 2007 Paolo Capriotti <p.capriotti@sns.it>
3 (c) 2007 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.
21 * Create a position using the information of a style12 line.
22 * \param turn Current turn.
23 * \param wkCastle King-side castling is possible for white
24 * \param wqCastle Queen-side castling is possible for white
25 * \param bkCastle King-side castling is possible for black
26 * \param bqCastle Queen-side castling is possible for black
27 * \param ep En-passant square.
29 virtual PositionPtr
createChessboard(
39 * Create a new piece using the given description string.
40 * \param description A string representing the piece to be created. Its
41 * meaning is defined by the variant.
42 * \return A newly created piece.
44 virtual PiecePtr
createPiece(const QString
& description
) = 0;
47 * Parse ICS verbose notation.
48 * \param str A string representation of the move to be parsed.
49 * \param turn The player who is moving.
50 * \return A move object corresponding to the given verbose representation.
52 virtual MovePtr
parseVerbose(const QString
& str
, const PositionPtr
& ref
) = 0;
57 template <typename Variant
>
58 class WrappedICSAPI
: public ICSAPI
{
60 virtual PositionPtr
createChessboard(int, bool, bool, bool, bool, const Point
&);
61 virtual PiecePtr
createPiece(const QString
& description
);
62 virtual MovePtr
parseVerbose(const QString
&, const PositionPtr
&) { return MovePtr(); }