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.
11 #ifndef HLVARIANT__SHOGI__PIECE_H
12 #define HLVARIANT__SHOGI__PIECE_H
20 class TAGUA_EXPORT Piece
{
43 Piece(Color color
= INVALID_COLOR
, Type type
= INVALID_TYPE
, bool promoted
= false);
46 virtual Color
color() const;
47 virtual Type
type() const;
49 virtual QString
colorName() const;
50 static QString
colorName(Color color
);
51 virtual QString
typeName() const;
52 static QString
typeName(Type type
);
53 virtual QString
name() const;
55 static Color
oppositeColor(Color color
);
57 virtual bool operator==(const Piece
& other
) const;
58 virtual bool operator!=(const Piece
& other
) const;
61 bool promoted() const;
65 } // namespace HLVariant
67 #endif // HLVARIANT__SHOGI__VARIANT_H