{"id":412,"date":"2020-01-24T11:16:32","date_gmt":"2020-01-24T17:16:32","guid":{"rendered":"https:\/\/greg-kennedy.com\/wordpress\/?p=412"},"modified":"2020-01-24T11:16:32","modified_gmt":"2020-01-24T17:16:32","slug":"discord-minesweeper","status":"publish","type":"post","link":"https:\/\/greg-kennedy.com\/wordpress\/2020\/01\/24\/discord-minesweeper\/","title":{"rendered":"Discord Minesweeper"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"515\" height=\"442\" src=\"https:\/\/greg-kennedy.com\/wordpress\/wp-content\/uploads\/2020\/01\/screenshot.png\" alt=\"\" class=\"wp-image-413\" srcset=\"https:\/\/greg-kennedy.com\/wordpress\/wp-content\/uploads\/2020\/01\/screenshot.png 515w, https:\/\/greg-kennedy.com\/wordpress\/wp-content\/uploads\/2020\/01\/screenshot-300x257.png 300w\" sizes=\"auto, (max-width: 515px) 100vw, 515px\" \/><\/figure>\n\n\n\n<p>Discord Minesweeper is a Perl script I wrote that builds on one of my previous projects, <a href=\"https:\/\/github.com\/greg-kennedy\/p5-WebService-Discord-Webhook\">WebService::Discord::Webhook<\/a>.  It generates Minesweeper boards and posts them to a Discord channel.  Each square contains a bomb, number, or blank space, made using the Emoji images.  Using Discord&#8217;s &#8220;spoiler&#8221; tag (wrapping text in double pipes, <code>||like this||<\/code>), the squares can be individually uncovered, thus making a playable game without even leaving chat.<\/p>\n\n\n\n<p><strong>The code is available on GitHub here:  <a href=\"https:\/\/github.com\/greg-kennedy\/Discord-Minesweeper\">https:\/\/github.com\/greg-kennedy\/Discord-Minesweeper<\/a><\/strong><\/p>\n\n\n\n<p>I ran this script for a few months, posting one board a night, but users eventually got sick of it and deleted the webhook&#8230; well, perhaps there are other games that could be done this way?  I think a Blackjack simulation would work: you are dealt some face-up cards, optionally some more (covered) to flip, and once you&#8217;re finished you can reveal the dealer&#8217;s hand to see who won.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Discord Minesweeper is a Perl script I wrote that builds on one of my previous projects, WebService::Discord::Webhook. It generates Minesweeper boards and posts them to a Discord channel. Each square contains a bomb, number, or blank space, made using the Emoji images. Using Discord&#8217;s &#8220;spoiler&#8221; tag (wrapping text in double pipes, ||like this||), the squares [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9,8],"tags":[],"class_list":["post-412","post","type-post","status-publish","format-standard","hentry","category-games","category-software"],"_links":{"self":[{"href":"https:\/\/greg-kennedy.com\/wordpress\/wp-json\/wp\/v2\/posts\/412","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/greg-kennedy.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/greg-kennedy.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/greg-kennedy.com\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/greg-kennedy.com\/wordpress\/wp-json\/wp\/v2\/comments?post=412"}],"version-history":[{"count":1,"href":"https:\/\/greg-kennedy.com\/wordpress\/wp-json\/wp\/v2\/posts\/412\/revisions"}],"predecessor-version":[{"id":414,"href":"https:\/\/greg-kennedy.com\/wordpress\/wp-json\/wp\/v2\/posts\/412\/revisions\/414"}],"wp:attachment":[{"href":"https:\/\/greg-kennedy.com\/wordpress\/wp-json\/wp\/v2\/media?parent=412"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/greg-kennedy.com\/wordpress\/wp-json\/wp\/v2\/categories?post=412"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/greg-kennedy.com\/wordpress\/wp-json\/wp\/v2\/tags?post=412"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}