Replaced (almost) all occurrences of 'kboard' with 'tagua'.
[tagua/yd.git] / src / positioninfo.h
blob23f7abc7a9121c8b4a3641090b89de64f634faad
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 POSITIONINFO_H
12 #define POSITIONINFO_H
14 #include <vector>
15 #include <map>
16 #include <boost/shared_ptr.hpp>
17 #include <QRegExp>
19 #include "tagua.h"
20 #include "icsgamedata.h"
22 class PositionInfo {
23 public:
24 enum Relation {
25 MoveListStart = -4,
26 IsolatedPosition = -3,
27 ObservingExamined = -2,
28 NotMyMove = -1,
29 ObservingPlayed = 0,
30 MyMove = 1,
31 Examining = 2,
32 UnknownRelation = -255
35 class CaptureIndexes {
36 public:
37 enum {
38 ChessboardStart = 1,
39 Turn = 9,
40 EnPassant = 10,
41 WhiteKingCastle = 11,
42 WhiteQueenCastle = 12,
43 BlackKingCastle = 13,
44 BlackQueenCastle = 14,
45 ReversibleMoves = 15,
46 GameNumber = 16,
47 WhitePlayer = 17,
48 BlackPlayer = 18,
49 Relation = 19,
50 StartingTime = 20,
51 StartingIncrement = 21,
52 WhiteTime = 24,
53 BlackTime = 25,
54 MoveOrdinal = 26,
55 LastMoveVerbose = 27,
56 TimeUsed = 28,
57 LastMove = 29,
58 Flip = 30
62 class PositionRow {
63 public:
64 std::vector<AbstractPiece::Ptr> row;
65 explicit PositionRow(VariantInfo* variant, const QString& str);
68 static QRegExp pattern;
70 bool valid;
71 PositionInfo(const std::map<int, ICSGameData>& games, const QString&);
73 int turn;
74 int moveIndex;
75 int index() const;
76 int gameNumber;
77 QString whitePlayer;
78 QString blackPlayer;
79 AbstractPosition::Ptr position;
80 Point enPassantSquare;
82 Relation relation;
84 QString lastMoveSAN;
85 QString lastMove;
86 int whiteTime;
87 int blackTime;
90 #endif // POSITIONINFO_H