Learning some heuristic techniques I needed a visual presentation of a puzzle.. so given I ws learning silverlight I wrote slider, which gives me a visual representation.
The puzzle code was based on looking at Laurence Moroney's silverlight book, see his blog (the book is a great introduction to silverlight). In fact all I kept was the clipping routine, the rest was rewritten to make a cleaner seperation between the game and the presentation, alá MVC:
Having written the code from scratch it shows how picking the correct data model and interfaces for the classes simplifies the code. I've not posted the code yet, I will after I've implemented the heuristic solver. The UI as it stands allows clicking on tiles to move, or using the keyboard (Up, Left, Down, Right). The UI also animates the slide movements.