This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The purpose of this is to randomly generate a grid of preset height and width (dimensionX, dimensionY) | |
* with each cell either a 0 or a 1. There is a randomly assigned start and exit position, and you must | |
* determine if, by following a trail of contiguous ones in the up, down, left, right positions, you can | |
* get from the start to the exit. | |
* | |
* Assumptions: | |
* 1. the start coordinates fall within valid grid | |
* 2. You can only move up, down, left, right | |
* 3. You cannot jump a 0. |
OlderNewer