File indexing completed on 2024-04-14 03:59:48

0001 /*
0002     This file is part of the KDE project "KLines"
0003 
0004     SPDX-FileCopyrightText: 2006 Dmitry Suzdalev <dimsuz@gmail.com>
0005 
0006     SPDX-License-Identifier: GPL-2.0-or-later
0007 */
0008 
0009 #ifndef COMMONDEFS_H
0010 #define COMMONDEFS_H
0011 
0012 enum BallColor { Blue=0, Brown, Cyan, Green, Red, Violet, Yellow, NumColors };
0013 
0014 struct FieldPos
0015 {
0016     int x;
0017     int y;
0018     FieldPos( int _x=-1, int _y=-1) : x(_x), y(_y) { }
0019     bool isValid() const { return (x != -1 && y != -1); }
0020     bool operator==(FieldPos other) const
0021     {
0022         return (x == other.x && y == other.y);
0023     }
0024 };
0025 Q_DECLARE_TYPEINFO(FieldPos, Q_MOVABLE_TYPE);
0026 #endif