Tagua now compiles with QT_NO_KEYWORDS. Boost 1.34 is required.
[tagua/yd.git] / src / genericposition.h
blob0b088939e38a5b8451c1ee70a2118c9c8e137e84
1 /*
2 Copyright (c) 2006 Paolo Capriotti <p.capriotti@sns.it>
3 (c) 2006 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 GENERICPOSITION_H
12 #define GENERICPOSITION_H
14 #include "point.h"
15 #include "piece.h"
17 class GenericPosition {
18 public:
19 virtual const ChessPiece* operator[](const Point&) const = 0;
20 virtual ChessPiece* operator[](const Point&) = 0;
22 virtual const Point first() const = 0;
23 virtual const Point last() const = 0;
24 virtual Point next(const Point&) const = 0;
25 virtual bool valid(const Point&) const = 0;
27 virtual void setup() = 0;
29 virtual GenericPosition* clone() const = 0;
30 virtual GenericPosition* _new() const = 0;
31 //
32 // virtual void basicMovePiece(const ChessMove&) = 0;
33 // virtual void basicDropPiece(ChessPiece*, const Point&) = 0;
34 // virtual void removePiece(const Point&) = 0;
35 // virtual void setPiece(const Point&, ChessPiece*) = 0;
36 //
37 // virtual void move(const ChessMove&) = 0;
38 virtual ChessPiece::Color turn() const = 0;
39 // virtual QString type() const = 0;
42 #endif