game is almost playable again

This commit is contained in:
Max-Wilhelm Bruker
2009-11-26 18:52:53 +01:00
parent 0d4717f40b
commit e796af2b89
34 changed files with 309 additions and 320 deletions

View File

@@ -20,6 +20,18 @@ enum ResponseCode { RespNothing, RespOk, RespInvalidCommand, RespInvalidData, Re
// list index, whereas cards in any other zone are referenced by their ids.
enum ZoneType { PrivateZone, PublicZone, HiddenZone };
class ColorConverter {
public:
static int colorToInt(const QColor &color)
{
return color.red() * 65536 + color.green() * 256 + color.blue();
}
static QColor colorFromInt(int colorValue)
{
return QColor(colorValue / 65536, (colorValue % 65536) / 256, colorValue % 256);
}
};
class SerializableItem {
protected:
SerializableItem *currentItem;