{"id":1302,"date":"2017-12-12T11:59:48","date_gmt":"2017-12-12T17:59:48","guid":{"rendered":"http:\/\/blogs.acu.edu\/sitc\/?p=1302"},"modified":"2017-12-12T12:06:46","modified_gmt":"2017-12-12T18:06:46","slug":"sitc-students-create-solve-for-minesweeper","status":"publish","type":"post","link":"https:\/\/blogs.acu.edu\/sitc\/sitc-students-create-solve-for-minesweeper\/","title":{"rendered":"SITC Students Create Solve for Minesweeper"},"content":{"rendered":"<p><span style=\"font-weight: 400\">Technology faculty continually look for ways to combine coursework with real world applications. For example, at the end of the semester of Scripting II (CS 115), students are tasked with creating a program that solves, or can be applied, to a real world problem. SITC students Matthew Middlebrook and Brighton Mica decided to create a program that could beat the game Minesweeper. Minesweeper is <\/span><span style=\"font-weight: 400\">a single-player puzzle video game where the objective of the game is to clear a rectangular board containing hidden mines or bombs without detonating any of them. Players receive help from clues about the number of neighboring mines in each field.<\/span><\/p>\n<p><span style=\"font-weight: 400\">As you can imagine, this was no easy task as they set out to beat a computer at a game that is difficult for most people to win. Middlebrook and Mica had some doubt at the beginning of their endeavor, d<\/span><span style=\"font-weight: 400\">ue to the sheer amount of work involved and wondering if it could even be done in the scripting language.<\/span>\u00a0<span style=\"font-weight: 400\">However, using the tools they had<\/span><span>learned from Scripting such as <\/span><span>lists to store the game board, complex functions, and if statements they were able to start planning out a program.<\/span><\/p>\n<p><span style=\"font-weight: 400\">After making the decision to go forward with the Minesweeper program as their final project they each began to brainstorm on possible ways to accomplish this task. Both students came up with ideas on how to solve the problem in different ways, based on ways they thought the game could be beat. Mica&#8217;s solution was to try and find the location of the items (numbers, blank spaces, and bombs) on the board by using r<\/span><\/p>\n<p>eference images. While the solution did work correctly and was very accurate, it turned out to be a very slow method. Middlebrook\u2019s solution was to get the coordinates of the game window and use some math to try and figure out where the spaces on the board were located. It took a long time to compile and figure out the correct positioning of everything, but this method turned out to be the fastest. Even though this idea was much more prone to error, especially if the window moved or resized, the pair decided to go the route of the most efficient method. Because this was such a complex program, the students also had to teach themselves some things that had not yet been covered in classes, such as opening a program. Through this research they learned enough to be able to write a working code.<\/p>\n<p><span style=\"font-weight: 400\"><img loading=\"lazy\" decoding=\"async\" class=\"size-medium wp-image-1308 aligncenter\" src=\"http:\/\/blogs.acu.edu\/sitc\/files\/2017\/12\/IMG_4017-300x225.jpeg\" alt=\"\" width=\"300\" height=\"225\" srcset=\"https:\/\/blogs.acu.edu\/sitc\/files\/2017\/12\/IMG_4017-300x225.jpeg 300w, https:\/\/blogs.acu.edu\/sitc\/files\/2017\/12\/IMG_4017-150x113.jpeg 150w, https:\/\/blogs.acu.edu\/sitc\/files\/2017\/12\/IMG_4017-768x576.jpeg 768w, https:\/\/blogs.acu.edu\/sitc\/files\/2017\/12\/IMG_4017-490x368.jpeg 490w, https:\/\/blogs.acu.edu\/sitc\/files\/2017\/12\/IMG_4017-510x382.jpeg 510w, https:\/\/blogs.acu.edu\/sitc\/files\/2017\/12\/IMG_4017-1080x810.jpeg 1080w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/span><\/p>\n<p><span style=\"font-weight: 400\">Mica and Middlebrook were able to write the program and win the game a majority of the time in around 2-3 seconds.\u00a0<\/span><span style=\"font-weight: 400\">Writing such a complex program was well beyond what was expected but the pair says they were inspired by the difficulty of the game and wanted to find a way to beat Minesweeper, achieving their goal and presenting an excellent final project for Scripting.\u00a0<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Technology faculty continually look for ways to combine coursework with real world applications. For example, at the end of the semester of Scripting II (CS 115), students are tasked with creating a program that solves, or can be applied, to a real world problem. SITC students Matthew Middlebrook and Brighton Mica decided to create a [&hellip;]<\/p>\n","protected":false},"author":14228,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"","_et_pb_old_content":"","_et_gb_content_width":"","_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[67],"tags":[],"class_list":["post-1302","post","type-post","status-publish","format-standard","hentry","category-blog"],"_links":{"self":[{"href":"https:\/\/blogs.acu.edu\/sitc\/wp-json\/wp\/v2\/posts\/1302","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.acu.edu\/sitc\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.acu.edu\/sitc\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.acu.edu\/sitc\/wp-json\/wp\/v2\/users\/14228"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.acu.edu\/sitc\/wp-json\/wp\/v2\/comments?post=1302"}],"version-history":[{"count":7,"href":"https:\/\/blogs.acu.edu\/sitc\/wp-json\/wp\/v2\/posts\/1302\/revisions"}],"predecessor-version":[{"id":1310,"href":"https:\/\/blogs.acu.edu\/sitc\/wp-json\/wp\/v2\/posts\/1302\/revisions\/1310"}],"wp:attachment":[{"href":"https:\/\/blogs.acu.edu\/sitc\/wp-json\/wp\/v2\/media?parent=1302"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.acu.edu\/sitc\/wp-json\/wp\/v2\/categories?post=1302"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.acu.edu\/sitc\/wp-json\/wp\/v2\/tags?post=1302"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}