{"id":231455,"date":"2020-12-16T13:20:12","date_gmt":"2020-12-16T21:20:12","guid":{"rendered":"https:\/\/devblogs.microsoft.com\/visualstudio\/?p=231455"},"modified":"2020-12-16T13:20:12","modified_gmt":"2020-12-16T21:20:12","slug":"head-first-csharp-contest-got-some-truly-creative-entries","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/visualstudio\/head-first-csharp-contest-got-some-truly-creative-entries\/","title":{"rendered":"[Guest post] Our Head First C# Contest Got Some Truly Creative Entries"},"content":{"rendered":"<p><em>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.<\/em><\/p>\n<p>We got some great projects from the <em>Head First C#<\/em> contest!<\/p>\n<p>In my <a href=\"https:\/\/devblogs.microsoft.com\/visualstudio\/guest-post-learn-c-with-visual-studio-visual-studio-for-mac-and-unity-and-win-a-free-book\/\">last guest post on the Visual Studio blog<\/a>, I announced a contest to give away copies of <em>Head First C#<\/em> (4<sup>th<\/sup> edition), the new book by Jenny Greene and me that was just released by O\u2019Reilly Media earlier this month. In that post, you can read all about how we use Visual Studio and Visual Studio for Mac as powerful\u00a0learning 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 \u201cbrain-friendly\u201d Head First approach to teaching to help make learning C# easier and more fun for our readers.<\/p>\n<p><a href=\"https:\/\/github.com\/head-first-csharp\/fourth-edition\"><img decoding=\"async\" class=\"wp-image-231456 aligncenter\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/12\/head-first-c-4rd-edition-cover.png\" alt=\"Head First C#, 4rd Edition \u2013 cover\" width=\"528\" height=\"610\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/12\/head-first-c-4rd-edition-cover.png 985w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/12\/head-first-c-4rd-edition-cover-259x300.png 259w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/12\/head-first-c-4rd-edition-cover-886x1024.png 886w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/12\/head-first-c-4rd-edition-cover-768x888.png 768w\" sizes=\"(max-width: 528px) 100vw, 528px\" \/><\/a><\/p>\n<p>Well, the contest is over, and we got an <strong><em>amazing<\/em><\/strong> response. Thank you so much to everyone who entered\u2014and congratulations to our lucky winners!<\/p>\n<p>For our contest, we asked people to do download the <strong>free PDF with the complete first four<\/strong> chapters from the <a href=\"https:\/\/github.com\/head-first-csharp\/fourth-edition\"><em>Head First C# (4<sup>th<\/sup> edition) <\/em>GitHub page<\/a>, 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.<\/p>\n<h2>Check out these fun solutions to the coding challenge!<\/h2>\n<p>Okay, without further ado, let\u2019s have a look at those projects! This <a href=\"https:\/\/github.com\/ great entry from Zerotonine\/MatchGame\/tree\/master\/MatchGame\">great entry from GitHub user Zerotonine<\/a> 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.<\/p>\n<p><img decoding=\"async\" width=\"484\" height=\"555\" class=\"wp-image-231457\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/12\/a-picture-containing-calendar-description-automat.png\" alt=\"A picture containing calendar Description automatically generated\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/12\/a-picture-containing-calendar-description-automat.png 484w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/12\/a-picture-containing-calendar-description-automat-262x300.png 262w\" sizes=\"(max-width: 484px) 100vw, 484px\" \/><\/p>\n<p>This <a href=\"https:\/\/github.com\/bodow\/BlazorMatchGame\">really impressive entry from GitHub user Pan (bodow)<\/a>\u00a0made 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 \u201chidden\u201d version where the animals are hidden, and only appear when you click them. Great work!<\/p>\n<p><img decoding=\"async\" width=\"1750\" height=\"1694\" class=\"wp-image-231458\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/12\/graphical-user-interface-application-description.png\" alt=\"Graphical user interface, application Description automatically generated\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/12\/graphical-user-interface-application-description.png 1750w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/12\/graphical-user-interface-application-description-300x290.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/12\/graphical-user-interface-application-description-1024x991.png 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/12\/graphical-user-interface-application-description-768x743.png 768w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/12\/graphical-user-interface-application-description-1536x1487.png 1536w\" sizes=\"(max-width: 1750px) 100vw, 1750px\" \/><\/p>\n<p>Here\u2019s a <a href=\"https:\/\/github.com\/karthikbachawala\/MatchTriple\">very innovative entry from GitHub user karthikbachawala<\/a> that modified the animal match game so the player has to find and match triples of animals instead of pairs.<\/p>\n<p><img decoding=\"async\" width=\"734\" height=\"617\" class=\"wp-image-231459\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/12\/calendar-description-automatically-generated.png\" alt=\"Calendar Description automatically generated\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/12\/calendar-description-automatically-generated.png 734w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/12\/calendar-description-automatically-generated-300x252.png 300w\" sizes=\"(max-width: 734px) 100vw, 734px\" \/><\/p>\n<p>GitHub user Stijn IJzermans (stijn192) <a href=\"https:\/\/github.com\/stijn192\/head-first-csharp\">gave us this creative entry<\/a> that has the player matching body parts instead of animals, which we especially enjoyed for some reason.<\/p>\n<p><img decoding=\"async\" width=\"2086\" height=\"1352\" class=\"wp-image-231460\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/12\/graphical-user-interface-application-description-1.png\" alt=\"Graphical user interface, application Description automatically generated\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/12\/graphical-user-interface-application-description-1.png 2086w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/12\/graphical-user-interface-application-description-1-300x194.png 300w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/12\/graphical-user-interface-application-description-1-1024x664.png 1024w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/12\/graphical-user-interface-application-description-1-768x498.png 768w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/12\/graphical-user-interface-application-description-1-1536x996.png 1536w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/12\/graphical-user-interface-application-description-1-2048x1327.png 2048w\" sizes=\"(max-width: 2086px) 100vw, 2086px\" \/><\/p>\n<p>Here\u2019s 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 <a href=\"https:\/\/github.com\/timtrout\/BlazorMatchGame\/blob\/main\/BlazorMatchGame\/Pages\/Index.razor\">implemented this more flexible solution<\/a> that determines the maximum number of matches from the total number of emoji in the game.<\/p>\n<pre class=\"prettyprint\">private void SetUpGame()\r\n\r\n{\r\n    Random random = new();\r\n    shuffledAnimals = animalEmoji\r\n      .OrderBy(item =&gt; random.Next())\r\n      .ToList();\r\n\r\n    matchesFound = 0;\r\n<span style=\"color: #003366;\"><strong>    maxMatches = shuffledAnimals.Count \/ 2;\r\n<\/strong><\/span>\r\n    tenthsOfSecondsElasped = 0;\r\n}<\/pre>\n<p>GitHub user charl4ee submitted <a href=\"https:\/\/github.com\/charl4ee\/ImageMatch\">this great entry<\/a> 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.<\/p>\n<p><img decoding=\"async\" width=\"484\" height=\"555\" class=\"wp-image-231461\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/12\/a-picture-containing-text-sky-description-automa.png\" alt=\"A picture containing text, sky Description automatically generated\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/12\/a-picture-containing-text-sky-description-automa.png 484w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/12\/a-picture-containing-text-sky-description-automa-262x300.png 262w\" sizes=\"(max-width: 484px) 100vw, 484px\" \/><\/p>\n<p>And finally, in the spirit of the season, GitHub user OwainWilliams submitted this <a href=\"https:\/\/github.com\/OwainWilliams\/MatchGame\">holiday-themed entry<\/a>.<\/p>\n<p><img decoding=\"async\" width=\"484\" height=\"555\" class=\"wp-image-231462\" src=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/12\/a-picture-containing-company-name-description-aut.png\" alt=\"A picture containing company name Description automatically generated\" srcset=\"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/12\/a-picture-containing-company-name-description-aut.png 484w, https:\/\/devblogs.microsoft.com\/visualstudio\/wp-content\/uploads\/sites\/4\/2020\/12\/a-picture-containing-company-name-description-aut-262x300.png 262w\" sizes=\"(max-width: 484px) 100vw, 484px\" \/><\/p>\n<h2>Announcing our contest winners&#8230;<\/h2>\n<p>The winners of the free book giveaway by random drawing (listed by GitHub usernames) are:<\/p>\n<ul>\n<li>Darth-Vlader1<\/li>\n<li>bryanwsmith<\/li>\n<li>jpietila78<\/li>\n<li>chaluvadis<\/li>\n<li>BondeGitHub<\/li>\n<li>johnster000<\/li>\n<li>pmbos<\/li>\n<li>wunmao<\/li>\n<li>zachsanford<\/li>\n<li>smp3142<\/li>\n<\/ul>\n<p>Congratulations to all of our winners!<\/p>\n<h2>Keep those creative solutions coming!<\/h2>\n<p>And, by the way, the contest may be over, but the fun\u2019s just beginning! You can <a href=\"https:\/\/github.com\/head-first-csharp\/fourth-edition\/raw\/master\/Head_First_CSharp_4e_chapters_1_to_4.pdf\">download the first four chapters of <em>Head First C#<\/em> today<\/a> 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\u2019re using Visual Studio for Mac. If you come up with a creative solution, let us know on Twitter (<a href=\"https:\/\/twitter.com\/HeadFirstCSharp\">@HeadFirstCSharp<\/a>). We\u2019d love to see how you get creative.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We just completed our Head First C# book contest! This blog post shows off some of the more creative solutions to the code challenge, and tells you how you can still get the first four chapters of the book for free.<\/p>\n","protected":false},"author":470,"featured_media":231462,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[155],"tags":[475,452],"class_list":["post-231455","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-visual-studio","tag-visual-studio-2019","tag-visual-studio-for-mac"],"acf":[],"blog_post_summary":"<p>We just completed our Head First C# book contest! This blog post shows off some of the more creative solutions to the code challenge, and tells you how you can still get the first four chapters of the book for free.<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/231455","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/users\/470"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/comments?post=231455"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/posts\/231455\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media\/231462"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/media?parent=231455"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/categories?post=231455"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/visualstudio\/wp-json\/wp\/v2\/tags?post=231455"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}