Changeset 588 for experiments
- Timestamp:
- 08/19/16 11:35:59 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
experiments/frams/foraminifera/data/scripts/foraminifera.expdef
r587 r588 329 329 var cr = Populations[0].add(geno); 330 330 cr.name = "Initial creature" + species + "_" + iter; 331 place CreatureRandomly(cr, 0, 0);331 placeRandomlyNotColliding(cr); 332 332 cr.energy = start_energy; 333 333 setGenotype({"opt" : "birth", "cr" : cr, "gen" : ploid, "species" : species, "energy0" : cr.energy, "genes" : species_genes[species], "parentsuids" : ["c0"]}); … … 410 410 placeCreatureRandomly(cr, 0, 0); 411 411 if (!cr.boundingBoxCollisions(0)) 412 { 413 cr.moveAbs(cr.pos_x, cr.pos_y, -cr.getPart(cr.numparts-1).sx); //place slightly under the bottom surface ("z" value depends on the size of the last=largest chamber) 412 414 return cr; 415 } 413 416 } 414 417 … … 539 542 if (!eating && cr.data->lifeparams->hibernated == 0) 540 543 { 544 mindistvec.z = 0; 541 545 mindistvec.normalize(); 542 546 mindistvec.scale(-1*movePerStep); … … 570 574 function foramMove(cr) 571 575 { 572 //adjustment in z axis573 cr.moveAbs(cr.pos_x, cr.pos_y, -cr.getPart(cr.numparts-1).sx); //place slightly under the bottom surface ("z" value depends on the size of the last=largest chamber)574 575 576 //are there any nutrients in zone 1 or 2? 576 577 {
Note: See TracChangeset
for help on using the changeset viewer.