Last active
August 29, 2015 14:11
-
-
Save jdee/e1b877ec0fb34b3c2723 to your computer and use it in GitHub Desktop.
Obama's first script
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
function findSnowden() { | |
var latitude=-90.0, longitude=-180.0; | |
var delta=1e-5; | |
var found=false; | |
// TODO: Speed up this part | |
while (!found && latitude <= 90.0 && longitude <= 180.0) { | |
var squareMeter = Russia.getRegion(latitude, longitude, 1.0, 1.0); | |
if (squareMeter) { | |
var results = squareMeter.find(function(person) { | |
return person.description.match(/thirty.*hacker/); | |
}); | |
for (var person in results) { | |
if (!person.isMale || !person.hasBeard()) continue; | |
// now what?? | |
// finish this after Colbert taping. | |
} | |
} | |
if (Defense.Secretary.current == null) { | |
Defense.Secretary.current = Defense.Bureaucrat.getNext(); | |
Senate.submit(Defense.Secretary.current); | |
} | |
// TODO: Learn nested loops. | |
latitude += delta; | |
longitude += delta; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment