Changed my email in the copyright statements.
[tagua/yd.git] / src / hlvariant / minishogi / variant.h
blob304c0ad96436b4129cfb8f300a32717d85bf5f49
1 /*
2 Copyright (c) 2007 Paolo Capriotti <p.capriotti@gmail.com>
3 (c) 2007 Maurizio Monge <maurizio.monge@kdemail.net>
4 (c) 2007 Yann Dirson <ydirson@altern.org>
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
13 #ifndef HLVARIANT__MINISHOGI__VARIANT_H
14 #define HLVARIANT__MINISHOGI__VARIANT_H
16 #include "../shogi/piece.h"
17 #include "../shogi/shogiban.h"
18 #include "../chess/move.h"
19 #include "../crazyhouse/move.h"
20 #include "gamestate.h"
21 #include "../shogi/legalitycheck.h"
22 #include "../shogi/serializer.h"
23 #include "../crazyhouse/movefactory.h"
24 #include "../animator.h"
25 #include "../dropanimator.h"
26 #include "../shogi/shogiactions.h"
28 namespace HLVariant {
29 namespace MiniShogi {
31 struct TAGUA_EXPORT Variant {
32 typedef Crazyhouse::MoveMixin<Chess::Move, Shogi::Piece> Move;
33 typedef GameState<Shogi::ShogiBan<5, 5, Shogi::Piece>, Move> GameState;
34 typedef Shogi::LegalityCheck<GameState> LegalityCheck;
35 typedef Shogi::Serializer<LegalityCheck> Serializer;
36 typedef DropAnimatorMixin<SimpleAnimator<Variant> > Animator;
37 typedef Crazyhouse::MoveFactory<GameState> MoveFactory;
38 typedef Variant MoveGenerator; // to make VariantData happy
40 static const bool hasICS = false;
41 static const bool m_simple_moves = false;
42 static const char *m_name;
43 static const char *m_theme_proxy;
45 static int moveListLayout() { return 0; }
47 OptList positionOptions() const { return OptList(); }
48 void setupMove(NormalUserMove& m) const;
49 ActionCollection* actions();
50 private:
51 Shogi::ShogiActions m_actions;
54 } // namespace MiniShogi
55 } // namespace HLVariant
57 #endif // HLVARIANT__MINISHOGI__VARIANT_H