new 33c0e9569b8825f53d773343cc90e4377118edca
[tagua/yd.git] / src / variants / shogi / behaviour.h
blobeb96e3b061234829692e37dcb1bb0bcdbd16a7ae
1 /*
2 Copyright (c) 2007 Paolo Capriotti <p.capriotti@gmail.com>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8 */
10 #ifndef SHOGI__BEHAVIOUR_H
11 #define SHOGI__BEHAVIOUR_H
13 #include <core/delegators/behaviour.h>
14 #include <core/promotionmanager.h>
16 class Move;
18 namespace Shogi {
20 class Behaviour : public Component, public Delegators::Behaviour {
21 private:
22 PromotionManager* m_promotionmanager;
23 public:
24 Behaviour(const IBehaviour* behaviour);
26 virtual void captureOn(IState* state, const Point& square) const;
28 void setPromotionManager(PromotionManager* pm) { m_promotionmanager = pm; }
29 const PromotionManager* promotionManager() const { return m_promotionmanager; }
31 virtual bool mayPromote(const IState* state, const Move& move) const;
34 } // namespace Shogi
36 #endif // SHOGI__BEHAVIOUR_H