The Win32_Rubik_Multi (MultiThreaded) sample is an MDI MFC application. Each child window has an unfolded view of a Rubik's cube and a 'Solve' button. When the button is pressed, the cube is randomly scrambled and then solved.
This demo was much more interesting in the days of slower machines. Now each cube solves so fast you can't get them all going at once. A good enhancement would be to add a 'Solve All' menu item that automatically sent the solve message to all the cubes so maybe a bunch could be solved at once.
The FILE/NEW menu item causes new child windows to be created, and each one is associated with a new Logic Server, running in a separate thread.
When you click the 'Solve' button in multiple windows, each one shows a cube being solved at the same (or as close to same as NT multi-threading allows) time.
This demo was derived from the Microsoft multi-threaded 'Bounce' sample, with solving Rubik's cube replacing the bouncing balls.
Copyright ©1987-2004 Amzi! inc. All Rights Reserved. Amzi! is a registered trademark and Logic Server and e-Prolog are trademarks of Amzi! inc.