Krzysztof Mossakowski
Windows Programming
2005 - Tasks
Cross-sectional
Version A
Puzzle
Demonstration
Main window:
the Car bitmap
bitmap file
bitmap is cut into rectangular pieces, each of them has the same dimensions;
the pieces are initially put randomly on the window, fitting the rectangular net (use even permutation to make the puzzle solveable);
the piece representing bottom right corner is removed - instead of it an empty rectangle is visible;
menu option for restarting the game (new initial permutation);
the window is sizeable;
Functionality:
the empty rectangle can be swapped with any of its four (left, right, top, bottom) neighbour pieces
swapping is executed by left clicking on the piece, which should be swapped with the empty rectangle
Requirements:
no flickering
drawing should be as efficient as possible (avoid StretchBlt in all cases except for resizing of the window)