[Guest post] Our Head First C# Contest Got Some Truly Creative Entries
This post was authored by guest blogger Andrew Stellman, author of the Head First C# book series, and published by the Visual Studio for Mac team on his behalf.
We got some great projects from the Head First C# contest!
In my last guest post on the Visual Studio blog, I announced a contest to give away copies of Head First C# (4th edition), the new book by Jenny Greene and me that was just released by O’Reilly Media earlier this month. In that post, you can read all about how we use Visual Studio and Visual Studio for Mac as powerful learning and exploration tools, taking advantage of their features that help you create and understand your code to help you learn C#. We put Visual Studio and Visual Studio for Mac right at the center of the book and incorporated Visual Studio directly in the learning, combining Visual Studio with the unique and innovative “brain-friendly” Head First approach to teaching to help make learning C# easier and more fun for our readers.
Well, the contest is over, and we got an amazing response. Thank you so much to everyone who entered—and congratulations to our lucky winners!
For our contest, we asked people to do download the free PDF with the complete first four chapters from the Head First C# (4th edition) GitHub page, do the project in the first chapter to build an animal matching game, and submit a link to us. We got too many entries to list them all, but I wanted to call out a few especially creative ones.
Check out these fun solutions to the coding challenge!
Okay, without further ado, let’s have a look at those projects! This great entry from GitHub user Zerotonine adds a nice visual flair to the WPF version of the Animal Match Game app by adding a background to the cell that the mouse is hovering over.
This really impressive entry from GitHub user Pan (bodow) made some significant improvements to the ASP.NET Blazor version of the game. In the default mode, it keeps track of the high score, encouraging you to beat your best time. They also added a really “hidden” version where the animals are hidden, and only appear when you click them. Great work!
Here’s a very innovative entry from GitHub user karthikbachawala that modified the animal match game so the player has to find and match triples of animals instead of pairs.
GitHub user Stijn IJzermans (stijn192) gave us this creative entry that has the player matching body parts instead of animals, which we especially enjoyed for some reason.
Here’s a solution that showed some nice technical sophistication. To make things easy for our readers, we kept the animal match game to a fixed number of animals to match. GitHub user Timothy Trout (timtrout) picked up on that and implemented this more flexible solution that determines the maximum number of matches from the total number of emoji in the game.
private void SetUpGame()
Random random = new();
shuffledAnimals = animalEmoji
.OrderBy(item => random.Next())
matchesFound = 0;
maxMatches = shuffledAnimals.Count / 2;
tenthsOfSecondsElasped = 0;
GitHub user charl4ee submitted this great entry that turned the WPF version of the game into a hidden match, adding a great effect where unmatched animals are displayed for an extra second before disappearing.
And finally, in the spirit of the season, GitHub user OwainWilliams submitted this holiday-themed entry.
Announcing our contest winners…
The winners of the free book giveaway by random drawing (listed by GitHub usernames) are:
Congratulations to all of our winners!
Keep those creative solutions coming!
And, by the way, the contest may be over, but the fun’s just beginning! You can download the first four chapters of Head First C# today and try your hand at the animal matching game project. You can do the WPF version for Windows, or the ASP.NET Blazor version if you’re using Visual Studio for Mac. If you come up with a creative solution, let us know on Twitter (@HeadFirstCSharp). We’d love to see how you get creative.