Created
June 3, 2015 16:24
-
-
Save kageurufu/0b33f6edd7ba71512d67 to your computer and use it in GitHub Desktop.
devdating.net solution
This file contains 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
return map.map(function(column_str) { | |
var col = column_str.split(""), | |
y = col.length; | |
while(y >= 0) { | |
if (col[y] == 'o' && col[y + 1] === '.') { | |
col[y + 1] = col[y]; | |
col[y] = '.'; | |
y++; | |
} else y--; | |
} | |
return col.join(""); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
i did something similar: