Add Tori Shogi variant.
[tagua/yd.git] / src / hlvariant / tori-shogi / variant.h
blobfbb021e10a26c588c978071c51350e3b0fb4d5a4
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.
12 #ifndef HLVARIANT__TORI_SHOGI__VARIANT_H
13 #define HLVARIANT__TORI_SHOGI__VARIANT_H
15 #include "piece.h"
16 #include "../shogi/shogiban.h"
17 #include "../chess/move.h"
18 #include "../crazyhouse/move.h"
19 #include "gamestate.h"
20 #include "legalitycheck.h"
21 #include "serializer.h"
22 #include "../crazyhouse/movefactory.h"
23 #include "../animator.h"
24 #include "../dropanimator.h"
25 #include "../shogi/shogiactions.h"
27 namespace HLVariant {
28 namespace ToriShogi {
30 struct TAGUA_EXPORT Variant {
31 typedef Crazyhouse::MoveMixin<Chess::Move, Piece> Move;
32 typedef GameState<Shogi::ShogiBan<7, 7, Piece>, Move> GameState;
33 typedef LegalityCheck<GameState> LegalityCheck;
34 typedef Serializer<LegalityCheck> Serializer;
35 typedef DropAnimatorMixin<SimpleAnimator<Variant> > Animator;
36 typedef Crazyhouse::MoveFactory<GameState> MoveFactory;
37 typedef Variant MoveGenerator; // to make VariantData happy
39 static const bool hasICS = false;
40 static const bool m_simple_moves = false;
41 static const bool m_hidden = 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 Shogi
55 } // namespace HLVariant
57 #endif // HLVARIANT__TORI_SHOGI__VARIANT_H