{"id":2627,"date":"2015-03-11T13:15:01","date_gmt":"2015-03-11T11:15:01","guid":{"rendered":"http:\/\/www.webcodegeeks.com\/?p=2627"},"modified":"2015-03-09T11:59:16","modified_gmt":"2015-03-09T09:59:16","slug":"generate-mazes-angularjs-8-bit-algorithms","status":"publish","type":"post","link":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/generate-mazes-angularjs-8-bit-algorithms\/","title":{"rendered":"Generate Mazes in AngularJS with 8-Bit Algorithms"},"content":{"rendered":"<p>I started programming on 8-bit machines. Back then it was normal to do amazing things with a mere 64 kilobytes of memory on a CPU that clocked in at 2.6 Megahertz. No, those aren\u2019t typos, and I meant \u201cmega-\u201d not \u201cgiga-\u201d.<\/p>\n<p>In those days we were forced to do a lot with a little, and \u201coptimizing code\u201d meant choosing op codes based on how many cycles they took to execute.<\/p>\n<p>&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<br \/>\n&nbsp;<\/p>\n<p><a href=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/03\/maze_thumb2.png\"><img decoding=\"async\" class=\"aligncenter wp-image-2650 size-full\" src=\"http:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/03\/maze_thumb2.png\" alt=\"maze_thumb[2]\" width=\"535\" height=\"448\" srcset=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/03\/maze_thumb2.png 535w, https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2015\/03\/maze_thumb2-300x251.png 300w\" sizes=\"(max-width: 535px) 100vw, 535px\" \/><\/a><\/p>\n<p>It is amazing to me to look back and see what we were able to accomplish. Software exists to perform everything from <a href=\"http:\/\/koti.kapsi.fi\/a1bert\/Dev\/pucrunch\/\" target=\"_blank\">advanced compression<\/a> to generating a <a href=\"http:\/\/semioriginalthought.blogspot.com\/2012\/04\/how-to-simply-create-mandelbrot-set-on.html\" target=\"_blank\">fractal Mandelbrot set<\/a>. In addition to programming I spent plenty of time playing adventure games. One of my favorite games I referenced in a recent talk. It rendered a 3D landscape for a first-person view. The sky would change color from day to night and it could even rain in this <a href=\"http:\/\/en.wikipedia.org\/wiki\/Alternate_Reality_(series)\" target=\"_blank\">Alternate Reality<\/a>.<\/p>\n<p>To create fun and playable games, developers often had to resort to creative coding techniques such as using algorithms to generate the game world. Disk access was notoriously slow (how many of you remember playing the Ultima series and spending most of your time waiting to load the next city or dungeon?) so generating terrain or worlds \u201con the fly\u201d made for better game play.<\/p>\n<p>I remember an old arcade game called Berserker and was reminded of the game when I watched a documentary called <a href=\"http:\/\/www.amazon.com\/gp\/product\/B00J8V6NMG\/ref=as_li_tl?ie=UTF8&amp;camp=1789&amp;creative=390957&amp;creativeASIN=B00J8V6NMG&amp;linkCode=as2&amp;tag=cei0e-20&amp;linkId=KDRPLVW7UH33OLMF\" target=\"_blank\">Chasing Ghosts<\/a>. It followed video game \u201cchampions\u201d (or perhaps addicts) from 1982 to present. In it, they reviewed the game and talked briefly about how it generated its famous mazes. There is a great write-up at the <a href=\"http:\/\/www.robotron2084guidebook.com\/home\/games\/berzerk\/mazegenerator\/code\/\" target=\"_blank\">Robotron site<\/a> about the algorithm.<\/p>\n<p>To create a \u201croom\u201d the game essentially assumed entrances on all four walls with eight \u201cpillars\u201d in the middle. Each pillar was assigned a random number, and the number determined if a wall would extend from the pillar in the north, south, east, or west position. The concept is so simple, I decided to <a href=\"https:\/\/onedrive.live.com\/redir?resid=E0964351DB1CB296!96604&amp;authkey=!AGdzIpevjEUY9mg&amp;ithint=file%2cxlsx\" target=\"_blank\">implement it in Excel<\/a>. To generate new mazes or see the underlying formulas, simply choose the Data option and select \u201cCalculate Workbook\u201d or edit any cell if you open it locally.<\/p>\n<p>Once that was done, it was fairly straightforward to move the concept to AngularJS. The bulk of the solution is more related to the algorithm and Angular is more the means to display it. I decided to use pure CSS to draw the maze, rather than SVG or some other technology, so really all that I need are a pillar and a wall:<\/p>\n<pre class=\"brush: css; title: ; notranslate\" title=\"\">\r\n.pillar {\r\n    width: 15px;\r\n    height: 5px;\r\n    margin: 0;\r\n    background: red;\r\n}\r\n.wall {\r\n    width: 15px;\r\n    height: 5px;\r\n    margin: 0;\r\n    background: green;\r\n}\r\n<\/pre>\n<p>In the game mazes are exhaustive and interconnect \u201crooms.\u201d For this example I decided to create two \u201crooms\u201d so there is a single maze with an entrance and exit (always rendered on the top middle and lower right). The maze is 26 x 16 with 16 columns, represented as an array of rows that each contain an array of columns. Generating the basic maze is as simple as:<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nfor (row = 0; row &lt; 25; row += 1) {\r\n\r\n    cells = &#x5B;];\r\n\r\n    maze.push(cells);\r\n\r\n    for (col = 0; col &lt; 16; col += 1) {\r\n\r\n        border = row === 0 || row === 24 ||\r\n\r\n            row === 12 || col === 0 ||\r\n\r\n            col === 15;\r\n\r\n        cells.push(border ? 1 : 0);\r\n\r\n    }\r\n\r\n}\r\n<\/pre>\n<p>The convention is a \u201c0\u201d for empty space, a \u201c1\u201d for a wall and a \u201c2\u201d for a pillar. Using the CSS and Angular, this is easily rendered with the following HTML:<\/p>\n<pre class=\"brush: xml; title: ; notranslate\" title=\"\">\r\n&lt;table&gt;\r\n    &lt;tr ng-repeat=&quot;row in ctrl.maze track by $index&quot;&gt;\r\n        &lt;td ng-repeat=&quot;col in row track by $index&quot;\r\n              ng-class=&quot;{ 'wall' : col === 1, 'pillar' : col === 2 }&quot;&gt;             \r\n        &lt;\/td&gt;\r\n    &lt;\/tr&gt;\r\n&lt;\/table&gt;\r\n<\/pre>\n<p>I then \u201cknock out\u201d the doors (defined as an array of row\/col coordinates):<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nangular.forEach(doors, function (door) {\r\n    maze&#x5B;door&#x5B;0]]&#x5B;door&#x5B;1]] = 0;\r\n});\r\n<\/pre>\n<p>After that, it\u2019s a simple question of iterating through the pillars to build the walls. Initially I wasn\u2019t concerned about each pillar having a unique wall (i.e. they can overlap) just to keep the code simple. I store an array of values for each \u201cdirection\u201d that indicates how to draw a wall relative to a pillar. For example, \u201cup\u201d means the previous three rows of the same column for the pillar:<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nup:\r\n    &#x5B;{\r\n        row: -1,\r\n        col: 0\r\n    }, {\r\n        row: -2,\r\n        col: 0\r\n    }, {\r\n        row: -3,\r\n        col: 0\r\n    }]\r\n<\/pre>\n<p>For each pillar, I draw the pillar on the map, then generate a random number. Based on the random number, I return a direction:<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nfunction getDirection(seed) {\r\n    if (seed &lt; 0.25) return dirs.left;\r\n    if (seed &lt; 0.5) return dirs.up;\r\n    if (seed &lt; 0.75) return dirs.right;\r\n    return dirs.down;\r\n}\r\n<\/pre>\n<p>From the direction, I can then build the wall. The initial code for the \u201cpillar\u201d loop looked like this:<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nangular.forEach(pillarCoords.row,\r\n    function (pillarRow) {\r\n        angular.forEach(pillarCoords.col,\r\n            function (pillarCol) {\r\n                var dir, rand = Math.random();\r\n                maze&#x5B;pillarRow]&#x5B;pillarCol] = 2;\r\n                dir = getDirection(rand);\r\n                angular.forEach(dir,\r\n                    function (offset) {\r\n                        maze&#x5B;pillarRow + offset.row]\r\n                            &#x5B;pillarCol + offset.col] = 1;\r\n        });\r\n    });\r\n});\r\n<\/pre>\n<p>I then enhanced the algorithm beyond the Excel implementation to ensure each pillar gets a unique wall that doesn\u2019t overlap with another pillar\u2019s wall. This is done in a simple loop that checks to see if a wall already exists in that direction, then asks for a new direction. The way it is implemented, there is a low probability a pillar could end up without a wall due to the random generator (in the rare case it always returns the same direction).<\/p>\n<p>That\u2019s it. The majority of the implementation is done in pure JavaScript (my preference), so Angular just seeds the maze with a call to the generator, and binds a click event to generate a new maze. The controller code looks like this:<\/p>\n<pre class=\"brush: jscript; title: ; notranslate\" title=\"\">\r\nfunction MazeController() { }\r\n \r\nangular.extend(MazeController.prototype, {\r\n    maze: mazeGenerator(),\r\n    newMaze: function () {\r\n        this.maze = mazeGenerator();\r\n    }\r\n});\r\n\r\napp.controller('mazeCtrl', MazeController);\r\n<\/pre>\n<p>You can view all of the source and <a href=\"http:\/\/jsfiddle.net\/jeremylikness\/7qu1qm6n\/\" target=\"_blank\">see the working fiddle here<\/a>.<\/p>\n<p>I love this approach. A simple algorithm can generate a practically limitless configuration of mazes that are all solvable. In the 8-bit days we were forced to find simple, elegant solutions to complex problems and I see that trend happening all over again with the popularity of mobile platforms. After all, this maze will run without hesitation <a href=\"http:\/\/jsfiddle.net\/jeremylikness\/7qu1qm6n\/embedded\/result\/\" target=\"_blank\">right on your phone<\/a>!<\/p>\n<div class=\"attribution\">\n<table>\n<tbody>\n<tr>\n<td><span class=\"reference\">Reference: <\/span><\/td>\n<td><a href=\"http:\/\/csharperimage.jeremylikness.com\/2015\/02\/generate-mazes-in-angularjs-with-8-bit.html\">Generate Mazes in AngularJS with 8-Bit Algorithms<\/a> from our <a href=\"http:\/\/www.webcodegeeks.com\/wcg\/\">WCG partner<\/a> Jeremy Likness at the <a href=\"http:\/\/csharperimage.jeremylikness.com\/\">C#er : IMage<\/a> blog.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>I started programming on 8-bit machines. Back then it was normal to do amazing things with a mere 64 kilobytes of memory on a CPU that clocked in at 2.6 Megahertz. No, those aren\u2019t typos, and I meant \u201cmega-\u201d not \u201cgiga-\u201d. In those days we were forced to do a lot with a little, and &hellip;<\/p>\n","protected":false},"author":40,"featured_media":909,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25],"tags":[],"class_list":["post-2627","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-angular-js"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Generate Mazes in AngularJS with 8-Bit Algorithms - Web Code Geeks - 2026<\/title>\n<meta name=\"description\" content=\"I started programming on 8-bit machines. Back then it was normal to do amazing things with a mere 64 kilobytes of memory on a CPU that clocked in at 2.6\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/generate-mazes-angularjs-8-bit-algorithms\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Generate Mazes in AngularJS with 8-Bit Algorithms - Web Code Geeks - 2026\" \/>\n<meta property=\"og:description\" content=\"I started programming on 8-bit machines. Back then it was normal to do amazing things with a mere 64 kilobytes of memory on a CPU that clocked in at 2.6\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/generate-mazes-angularjs-8-bit-algorithms\/\" \/>\n<meta property=\"og:site_name\" content=\"Web Code Geeks\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/webcodegeeks\" \/>\n<meta property=\"article:published_time\" content=\"2015-03-11T11:15:01+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"150\" \/>\n\t<meta property=\"og:image:height\" content=\"150\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Jeremy Likness\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/jeremylikness\" \/>\n<meta name=\"twitter:site\" content=\"@webcodegeeks\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeremy Likness\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/generate-mazes-angularjs-8-bit-algorithms\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/generate-mazes-angularjs-8-bit-algorithms\/\"},\"author\":{\"name\":\"Jeremy Likness\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/2cd31c082e3e1cc5f595ba18a6e03a43\"},\"headline\":\"Generate Mazes in AngularJS with 8-Bit Algorithms\",\"datePublished\":\"2015-03-11T11:15:01+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/generate-mazes-angularjs-8-bit-algorithms\/\"},\"wordCount\":1073,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/generate-mazes-angularjs-8-bit-algorithms\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg\",\"articleSection\":[\"Angular.js\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/generate-mazes-angularjs-8-bit-algorithms\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/generate-mazes-angularjs-8-bit-algorithms\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/generate-mazes-angularjs-8-bit-algorithms\/\",\"name\":\"Generate Mazes in AngularJS with 8-Bit Algorithms - Web Code Geeks - 2026\",\"isPartOf\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/generate-mazes-angularjs-8-bit-algorithms\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/generate-mazes-angularjs-8-bit-algorithms\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg\",\"datePublished\":\"2015-03-11T11:15:01+00:00\",\"description\":\"I started programming on 8-bit machines. Back then it was normal to do amazing things with a mere 64 kilobytes of memory on a CPU that clocked in at 2.6\",\"breadcrumb\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/generate-mazes-angularjs-8-bit-algorithms\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/generate-mazes-angularjs-8-bit-algorithms\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/generate-mazes-angularjs-8-bit-algorithms\/#primaryimage\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg\",\"width\":150,\"height\":150},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/generate-mazes-angularjs-8-bit-algorithms\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.webcodegeeks.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"JavaScript\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/javascript\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Angular.js\",\"item\":\"https:\/\/www.webcodegeeks.com\/category\/javascript\/angular-js\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Generate Mazes in AngularJS with 8-Bit Algorithms\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#website\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"name\":\"Web Code Geeks\",\"description\":\"Web Developers Resource Center\",\"publisher\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.webcodegeeks.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#organization\",\"name\":\"Exelixis Media P.C.\",\"url\":\"https:\/\/www.webcodegeeks.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"contentUrl\":\"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png\",\"width\":864,\"height\":246,\"caption\":\"Exelixis Media P.C.\"},\"image\":{\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/webcodegeeks\",\"https:\/\/x.com\/webcodegeeks\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/2cd31c082e3e1cc5f595ba18a6e03a43\",\"name\":\"Jeremy Likness\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/b4d8ee78925818e3f7a4d0d82df06d34a2b76aa4d260a1f4b67dc0553efbf1b6?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/b4d8ee78925818e3f7a4d0d82df06d34a2b76aa4d260a1f4b67dc0553efbf1b6?s=96&d=mm&r=g\",\"caption\":\"Jeremy Likness\"},\"description\":\"Jeremy Likness is a principal architect at iVision, Inc. He has been building enterprise applications using the Microsoft stack for 20 years with a focus on web-based solutions for the past 15. A prolific author and speaker, Jeremy's mission is to empower developers to create success in their careers through learning and growth.\",\"sameAs\":[\"http:\/\/csharperimage.jeremylikness.com\/\",\"http:\/\/linkedin.com\/in\/jeremylikness\",\"https:\/\/x.com\/https:\/\/twitter.com\/jeremylikness\"],\"url\":\"https:\/\/www.webcodegeeks.com\/author\/jeremy-likness\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Generate Mazes in AngularJS with 8-Bit Algorithms - Web Code Geeks - 2026","description":"I started programming on 8-bit machines. Back then it was normal to do amazing things with a mere 64 kilobytes of memory on a CPU that clocked in at 2.6","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/generate-mazes-angularjs-8-bit-algorithms\/","og_locale":"en_US","og_type":"article","og_title":"Generate Mazes in AngularJS with 8-Bit Algorithms - Web Code Geeks - 2026","og_description":"I started programming on 8-bit machines. Back then it was normal to do amazing things with a mere 64 kilobytes of memory on a CPU that clocked in at 2.6","og_url":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/generate-mazes-angularjs-8-bit-algorithms\/","og_site_name":"Web Code Geeks","article_publisher":"https:\/\/www.facebook.com\/webcodegeeks","article_published_time":"2015-03-11T11:15:01+00:00","og_image":[{"width":150,"height":150,"url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg","type":"image\/jpeg"}],"author":"Jeremy Likness","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/jeremylikness","twitter_site":"@webcodegeeks","twitter_misc":{"Written by":"Jeremy Likness","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/generate-mazes-angularjs-8-bit-algorithms\/#article","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/generate-mazes-angularjs-8-bit-algorithms\/"},"author":{"name":"Jeremy Likness","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/2cd31c082e3e1cc5f595ba18a6e03a43"},"headline":"Generate Mazes in AngularJS with 8-Bit Algorithms","datePublished":"2015-03-11T11:15:01+00:00","mainEntityOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/generate-mazes-angularjs-8-bit-algorithms\/"},"wordCount":1073,"commentCount":0,"publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/generate-mazes-angularjs-8-bit-algorithms\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg","articleSection":["Angular.js"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/generate-mazes-angularjs-8-bit-algorithms\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/generate-mazes-angularjs-8-bit-algorithms\/","url":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/generate-mazes-angularjs-8-bit-algorithms\/","name":"Generate Mazes in AngularJS with 8-Bit Algorithms - Web Code Geeks - 2026","isPartOf":{"@id":"https:\/\/www.webcodegeeks.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/generate-mazes-angularjs-8-bit-algorithms\/#primaryimage"},"image":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/generate-mazes-angularjs-8-bit-algorithms\/#primaryimage"},"thumbnailUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg","datePublished":"2015-03-11T11:15:01+00:00","description":"I started programming on 8-bit machines. Back then it was normal to do amazing things with a mere 64 kilobytes of memory on a CPU that clocked in at 2.6","breadcrumb":{"@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/generate-mazes-angularjs-8-bit-algorithms\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/generate-mazes-angularjs-8-bit-algorithms\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/generate-mazes-angularjs-8-bit-algorithms\/#primaryimage","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2014\/10\/angularjs-logo.jpg","width":150,"height":150},{"@type":"BreadcrumbList","@id":"https:\/\/www.webcodegeeks.com\/javascript\/angular-js\/generate-mazes-angularjs-8-bit-algorithms\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.webcodegeeks.com\/"},{"@type":"ListItem","position":2,"name":"JavaScript","item":"https:\/\/www.webcodegeeks.com\/category\/javascript\/"},{"@type":"ListItem","position":3,"name":"Angular.js","item":"https:\/\/www.webcodegeeks.com\/category\/javascript\/angular-js\/"},{"@type":"ListItem","position":4,"name":"Generate Mazes in AngularJS with 8-Bit Algorithms"}]},{"@type":"WebSite","@id":"https:\/\/www.webcodegeeks.com\/#website","url":"https:\/\/www.webcodegeeks.com\/","name":"Web Code Geeks","description":"Web Developers Resource Center","publisher":{"@id":"https:\/\/www.webcodegeeks.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.webcodegeeks.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.webcodegeeks.com\/#organization","name":"Exelixis Media P.C.","url":"https:\/\/www.webcodegeeks.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","contentUrl":"https:\/\/www.webcodegeeks.com\/wp-content\/uploads\/2022\/06\/exelixis-logo.png","width":864,"height":246,"caption":"Exelixis Media P.C."},"image":{"@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/webcodegeeks","https:\/\/x.com\/webcodegeeks"]},{"@type":"Person","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/2cd31c082e3e1cc5f595ba18a6e03a43","name":"Jeremy Likness","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.webcodegeeks.com\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/b4d8ee78925818e3f7a4d0d82df06d34a2b76aa4d260a1f4b67dc0553efbf1b6?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/b4d8ee78925818e3f7a4d0d82df06d34a2b76aa4d260a1f4b67dc0553efbf1b6?s=96&d=mm&r=g","caption":"Jeremy Likness"},"description":"Jeremy Likness is a principal architect at iVision, Inc. He has been building enterprise applications using the Microsoft stack for 20 years with a focus on web-based solutions for the past 15. A prolific author and speaker, Jeremy's mission is to empower developers to create success in their careers through learning and growth.","sameAs":["http:\/\/csharperimage.jeremylikness.com\/","http:\/\/linkedin.com\/in\/jeremylikness","https:\/\/x.com\/https:\/\/twitter.com\/jeremylikness"],"url":"https:\/\/www.webcodegeeks.com\/author\/jeremy-likness\/"}]}},"_links":{"self":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/2627","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/users\/40"}],"replies":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/comments?post=2627"}],"version-history":[{"count":0,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/posts\/2627\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media\/909"}],"wp:attachment":[{"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/media?parent=2627"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/categories?post=2627"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.webcodegeeks.com\/wp-json\/wp\/v2\/tags?post=2627"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}