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.
11 #ifndef GENERICPOSITION_H
12 #define GENERICPOSITION_H
17 class GenericPosition
{
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;
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;
37 // virtual void move(const ChessMove&) = 0;
38 virtual ChessPiece::Color
turn() const = 0;
39 // virtual QString type() const = 0;