Prepare 1.0 alpha3 release.
[tagua/yd.git] / src / icsapi.impl.h
blobac9bb4a6fb0b072ebdc01df9ae35ee706f942401
1 /*
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.
9 */
11 #ifndef ICSAPI_IMPL_H
12 #define ICSAPI_IMPL_H
14 #include "tagua_wrapped.h"
15 #include "piecefactory.h"
17 template <typename Variant>
18 PositionPtr WrappedICSAPI<Variant>::createChessboard(
19 int turn,
20 bool wkCastle,
21 bool wqCastle,
22 bool bkCastle,
23 bool bqCastle,
24 const Point& ep) {
25 return PositionPtr(
26 new WrappedPosition<Variant>(typename Variant::Position(
27 static_cast<typename Variant::Piece::Color>(turn),
28 wkCastle, wqCastle, bkCastle, bqCastle, ep)));
33 template <typename Variant>
34 PiecePtr WrappedICSAPI<Variant>::createPiece(const QString& description) {
35 return AbstractPiece::Ptr(new WrappedPiece<Variant>(
36 PieceFactory<Variant>::createPiece(description)));
40 #endif // ICSAPI_IMPL_H