Finalize support for delegating behaviours.
[tagua/yd.git] / src / variants / chess / behaviour.h
blobb82150857570bb0221f7e1573ba3f378fa171a0c
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 CHESS__BEHAVIOUR_H
11 #define CHESS__BEHAVIOUR_H
13 #include <core/behaviour.h>
15 namespace Chess {
17 class Behaviour : public IBehaviour {
18 Q_OBJECT
19 public:
20 Behaviour();
21 Behaviour(const Behaviour& other);
22 virtual void captureOn(IState* state, const Point& square) const;
23 virtual void move(IState* state, const Move& m) const;
24 virtual void advanceTurn(IState* state) const;
25 virtual Point captureSquare(const IState* state, const Move& m) const;
26 virtual const IColor* opponent(const IColor* player) const;
27 virtual Point direction(const IColor* player) const;
28 virtual void setDelegator(IBehaviour* behaviour) { }
29 public Q_SLOTS:
30 virtual IBehaviour* clone() const;
33 } // namespace Chess
35 #endif // CHESS__BEHAVIOUR_H