In this tutorial, written for beginning programmers, I’d like to show a little demonstration on the usage of delegates and how we can go all crazy by refactoring and magically see all our duplicate code disappear.
Imagine we are writing the next ultimate Command&Conquer spinoff which can run on any computer …in console-mode. Read more…
Our students are creating classic boardgames using Silverlight. A problem that kept occurring was the following: “A player throws a certain number with the dice. How do I know, given his current location on the board, to which squares on the board the player is allowed to move to”.
I’ve written a small utility class that can be (re)used for simple applications where you have 2-dimensional map with certain squares on which the player can stand, and other not.
You can download the project here. Feel free to reuse/adapt. I’ve included to demo-usages.
Read more…