Counting Money Game – Generics & Collections

CoinsCd

CoinsMainForm

This is a coin counting game that demonstrates the use of generic collections. Instead using arrays or arraylists collections are a better fit in most cases. Plus I’m finding out that in my collections classes my add, remove, sort, etc.., algorithms don’t have to be as complicated. It’s making for some cleaner code. This combined with the knowledge of events, event handlers, delegates, and lambda expressions things are moving right along. When the game is started a random amount is selected. The players job is to use the amount buttons provided to match that amount. There are mouse button event handlers in place to remove the money from the screen by clicking on them. I’m trying to create more classes that do the work behind the scenes away from my MainForm code.

Continue reading

Advertisements