Add a PromotionManager.
[tagua/yd.git] / src / icsapi.h
blob2f232e3d34762ecdfa9f6116bcfb3cf4750655bf
1 /*
2 Copyright (c) 2007 Paolo Capriotti <p.capriotti@gmail.com>
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.
9 */
11 #ifndef ICSAPI_H
12 #define ICSAPI_H
14 #include <core/move.h>
16 class ICSAPI {
17 public:
18 virtual ~ICSAPI() { }
20 /**
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 StatePtr createChessboard(
30 int turn,
31 bool wkCastle,
32 bool wqCastle,
33 bool bkCastle,
34 bool bqCastle,
35 const Point& ep) = 0;
38 /**
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 Piece createPiece(const QString& description) = 0;
46 /**
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 Move parseVerbose(const QString& str, const StatePtr& ref) = 0;
55 #endif // ICSAPI_H