// Copyright, T. Pavlidis 2006
// Mimimal Implementation of CBead
// Caution: This is a simplified version of the one used in
// the examples. It has not been tested on its own.

#pragma once

class CBead
{
public:
	CBead(void);
public:
	~CBead(void);

	COLORREF m_color;
	CRect m_pos;
	BOOL  m_broken;

	BOOL InitBead(COLORREF color, CSize size, CPoint point);
	void MoveTo(CPoint point);
	void MoveBy(int dx, int dy);
	void Display(CDC *pDC);

	BOOL PointInBead(CPoint point);
	BOOL TooClose(CBead *bp);
	BOOL InsideRect(CRect *rp);

	int GetWidth() { return m_pos.Width(); }
	int GetHeight() { return m_pos.Height(); }
};

