Skip to content

Instantly share code, notes, and snippets.

@Owen-Chiu
Created August 27, 2015 00:44
Show Gist options
  • Save Owen-Chiu/bd211243f90de9c7f428 to your computer and use it in GitHub Desktop.
Save Owen-Chiu/bd211243f90de9c7f428 to your computer and use it in GitHub Desktop.
ant farm ant code
function () {
this.direction += Math.random()*10-5;
if (this.bump) this.direction += 90;
field.darken(this.x,this.y,0,100);
var fieldcolor = field.get(this.x,this.y)
if (fieldcolor[2]<250) this.height +=1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment