//FIGHT! //This method handles battles between two wanderers who occupy the same pixel. void battle (Wanderer c1,Wanderer c2) { float dice1 = random(20); float dice2 = random(20); c1.health -= dice2; c2.health -= dice1; streak(c1, dice1); streak(c2, dice2); if (c1.health < 0) { c1.die();}; if (c2.health < 0) { c2.die();}; }; void streak (Wanderer source, float l) { if (millis() > 1000) { float angle = atan2(source.xv, source.yv); //Battles are represented as colour streaks. tstreak(source.x, source.y, angle, l, source.thecolor); }; };