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
| /* | |
| Rocks are falling from the sky! You get an array of rocks o and platforms # | |
| Simulate rocks' flight until they hit a platform, another rock or the bottom. Platforms stay put. | |
| map is an array in the format ['ooo###...', ...], where map[2][5] translates to the rock at x: 2, y: 5 | |
| return the result after all rocks have stopped moving. | |
| */ | |
| (function() { | |
| return map.map(function(col) { | |
| var count = 0, |