Created
February 5, 2013 17:36
-
-
Save captainsafia/4716111 to your computer and use it in GitHub Desktop.
My solutions to the AI Playground aritificial intelligence challenges -- http://aichallenges.appspot.com/mainpage
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
// You are given a map of arbitrary size represented | |
// as a two-dimensional array, and your job is to | |
// return the same map, but rotated 180 degrees. | |
this.run = function(map) { | |
var newmap = []; | |
for (var i = map.length-1; i >= 0; i--) { | |
newmap.push(map[i].reverse()); | |
} | |
return newmap; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment