This is a known but a different puzzle game. The images of puzzles are not included; in fact, the images are captured from your desktop! First of all, you can select the game difficulty: easy, medium, hard, and by pressing the Start button, the game will begin after the number of seconds you have specified (default is 2 seconds).
- to move a rectangle, select the first and then a second one by clicking on the rectangles.
- to rotate a rectangle by 180 degrees, right click on the rectangle.
- to reveal the borders of each slice, you can click the middle button of the mouse.
Here are the main methods:
void ReplaceRects(CRect rectSource, CRect rectDest);
void InvertRect(CRect rect);
void FrameRect(CRect rect, BOOL bClear=FALSE);
CRect GetSquareFromPoint(CPoint point);
afx_msg void OnLButtonDown(UINT nFlags, CPoint point);
afx_msg void OnMButtonDown(UINT nFlags, CPoint point);
afx_msg void OnRButtonDown(UINT nFlags, CPoint point);
afx_msg void OnExit();
afx_msg void OnTimer(UINT nIDEvent);
This is not a new game, just an attempt to help others on how to write such programs and may be find some techniques from this. Any suggestions and refinements are welcome. Enjoy the game!