Skip to content

Instantly share code, notes, and snippets.

@joshcough
Created January 27, 2013 22:36
Show Gist options
  • Save joshcough/4651034 to your computer and use it in GitHub Desktop.
Save joshcough/4651034 to your computer and use it in GitHub Desktop.
`
PatchesOwn.init(2)
world = new World(-5, 5, -5, 5);
function SETUP () {
world.clearall()
//AgentSet.ask(world.patches(), function(){ AgentSet.setPatchVariable(5,false) })
//AgentSet.ask(Prims.patch(0, 0), function(){ AgentSet.setPatchVariable(5,true) })
//AgentSet.ask(Prims.patch(-1, 0), function(){ AgentSet.setPatchVariable(5,true) })
//AgentSet.ask(Prims.patch(0, -1), function(){ AgentSet.setPatchVariable(5,true) })
AgentSet.ask(Prims.patch(0, 1), function(){ AgentSet.setPatchVariable(5,true) })
//AgentSet.ask(Prims.patch(1, 1), function(){ AgentSet.setPatchVariable(5,true) })
};
SETUP();
console.log(Prims.patch(0, 1));
`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment