889b4f2100e0ab1f74db9844e910f68184dd6b27
1 #include "defaultstate.h"
2 #include "defaulttype.h"
7 bool DefaultType::canMove(const Piece
& piece
, const Piece
&,
8 Move
& move
, const IState
* state
) const {
9 const DefaultState
* dstate
= dynamic_cast<const DefaultState
*>(state
);
11 kDebug() << "use of a non-DefaultState-derived state with DefaultType";
14 std::vector
<const Point
*> moves
= dstate
->theoreticalMoves(piece
, move
.src());
15 std::vector
<const Point
*>::const_iterator it
;
16 for (it
= moves
.begin(); it
!= moves
.end(); it
++) {
17 if (move
.dst() == **it
)
22 // delete remaining points in the vector
23 for (; it
!= moves
.end(); it
++)