Initial porting to the new component API.
[tagua/yd.git] / src / variants / chess / validator.h
blobbb5281d71adebf4915d4eda0f2a6ebe17a377f2f
1 /*
2 Copyright (c) 2007 Paolo Capriotti <p.capriotti@gmail.com>
3 (c) 2007 Maurizio Monge <maurizio.monge@kdemail.net>
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9 */
11 #ifndef CHESS__VALIDATOR_H
12 #define CHESS__VALIDATOR_H
14 #include <core/component.h>
15 #include <core/validator.h>
17 namespace Chess {
19 class Validator : public Component, public IValidator {
20 Q_OBJECT
21 public Q_SLOTS:
22 virtual bool pseudolegal(const IState* state, Move& move) const;
24 virtual bool legal(const IState* state, Move& move) const;
26 virtual bool attacks(const IState* state, const IColor* player,
27 const Point& square, const Piece& target = Piece()) const;
29 virtual const IColor* mover(const IState* state, const Move& move) const;
34 #endif // CHESS__VALIDATOR_H