/*
        Point.h

        V1.00 - 031196  Kimmo Teräväinen
        -----   ------  ----------------
        V0.10   031196  Code moved from poker/kuvio.h and generalized

*/

#ifndef DC1_POINT
#define DC1_POINT

class cItemR2 {
  int x,y;
public:
  cItemR2(int nx=0,int ny=0) { x=nx; y=ny; }

  virtual cItemR2 &operator=(const cItemR2 &p) { x=p.x; y=p.y; return *this;}
  virtual cItemR2 &operator+=(const cItemR2 &p) {
    x+=p.x; y+=p.y;
    return *this;
  }
  virtual cItemR2 &operator-=(const cItemR2 &p) {
    x-=p.x; y-=p.y;
    return *this;
  }

  int X() const { return x; }
  int Y() const { return y; }
};

class cPoint : public cItemR2 {
public:
  cPoint(int nx,int ny) : cItemR2(nx,ny) {}
  cPoint(const cItemR2 &p) : cItemR2(p) {}
};
class cSize : public cItemR2 {
public:
  cSize(int nx,int ny) : cItemR2(nx,ny) {}
  cSize(const cItemR2 &p) : cItemR2(p) {}
};

#endif