Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let targetXLymphocyte = function (creature) {
- let cohesion = creature.cohesion(world.bacterias);
- return cohesion.x / world.width;
- }
- let targetYLymphocyte = function (creature) {
- let cohesion = creature.cohesion(world.bacterias);
- return cohesion.y / world.height;
- }
- let targetAngleLymphocyte = function (creature) {
- let alignment = creature.align(world.bacterias);
- return (alignment.angle() + Math.PI) / (Math.PI * 2);
- }
Add Comment
Please, Sign In to add comment