public bool canibal(snake s) { for (int i = 0; i < s.body.Count; i++) { if (this.body[0].IntersectsWith(s.body[i])) { return(true); } } return(false); }
public void die(snake s, ref bool ya) { for (int i = 0; i < s.body.Count; i++) { for (int j = 0; j < this.body.Count; j++) { if (this.body[j].IntersectsWith(s.body[i])) { ya = true; } } } }
public bool collideWithPlayer(snake p) { for (int i = 0; i < this.body.Count; i++) { for (int j = 0; j < p.body.Count; j++) { if (this.body[i].IntersectsWith(p.body[j])) { return(true); } } } return(false); }