Puzzle Program Rick Very David Redenbaugh
Motivation and Goals A puzzle game where user can move pieces to complete a picture Learn more about Win32 Graphical System Starting with simple version while building the foundation for more complex puzzles
Capabilities, Platform, Audience Click to pick up & place Shifting “tray” of pieces Undo moves Grid display Automatic solve Puzzle Picture Win32 api, Windows 2000/XP
Data Structures Stacks and vectors Puzzle Pieces Standard pieceStandard piece Multi-pieceMulti-piece Bitmaps
Performance Comparisons STL Vector vs. myVector with 100 elements, sortingwith 100 elements, sorting Vector is times faster with 200 elementswith 200 elements Vector is times faster With 500 elementsWith 500 elements myVector is times faster With 1000 elementsWith 1000 elements myVector is times faster STL Stack vs. myStack with 100 elements, sortingwith 100 elements, sorting myStack is times faster with 200 elementswith 200 elements myStack is times faster With 500 elementsWith 500 elements myStack is times faster With 1000 elementsWith 1000 elements myStack is times faster
Conclusion We created a fully functional puzzle based on rectangular blocks. We hope to add the ability to use arbitrary groups of rectangles, which would allow us almost limitless puzzle configurations if we used the right puzzle generation algorithm. We also learned a great deal about using the Win32 API to produce graphical display. We also had the opportunity to develop our own templated versions of the vector and stack data structures. Our versions showed themselves to be faster in almost all cases but lack some of the more powerful functions of the STL versions.