Added action callbacks.
[tagua/yd.git] / src / hlvariant / chess / variant.h
blobb10b2eab0819f92b95dbf47167eb64a340e6fffd
1 /*
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.
9 */
11 #ifndef HLVARIANT__CHESS__VARIANT_H
12 #define HLVARIANT__CHESS__VARIANT_H
14 #include <kactioncollection.h>
16 #include "movegenerator.h"
17 #include "serializer.h"
18 #include "export.h"
19 #include "option.h"
20 #include "../animator.h"
21 #include "../movefactory.h"
23 namespace HLVariant {
24 namespace Chess {
26 struct TAGUA_EXPORT Variant {
27 typedef GameState<CustomBoard<8, 8, Piece>, Move> GameState;
28 typedef LegalityCheck<GameState> LegalityCheck;
29 typedef MoveGenerator<LegalityCheck> MoveGenerator;
30 typedef Serializer<MoveGenerator> Serializer;
31 typedef SimpleAnimator<Variant> Animator;
32 typedef MoveFactory<GameState> MoveFactory;
34 static const bool hasICS = true;
35 static const bool m_simple_moves = false;
36 static const char *m_name;
37 static const char *m_theme_proxy;
39 static int moveListLayout() { return 0; }
41 OptList positionOptions() const { return OptList(); }
42 void setupActions(ActionCollection*);
44 Variant();
45 private:
46 GameState::Board::Piece::Type m_promotion;
48 void promote_to_queen();
49 void promote_to_rook();
50 void promote_to_bishop();
51 void promote_to_knight();
54 } // namespace Chess
55 } // namespace HLVariant
57 #endif // HLVARIANT__CHESS__VARIANT_H