Skip to content

Commit 517b9d5

Browse files
committed
Remove unused Snake::intersects
This method turned out not to be very useful, since we almost always want to determine the Snake that's 'at fault' for colliding with another, which we do by checking whose snake's head is colliding.
1 parent 06f1016 commit 517b9d5

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

src/model/snake.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,6 @@ impl Snake {
4747
self.field_set().len() < self.fields.len()
4848
}
4949

50-
pub fn intersects(&self, other: &Snake) -> bool {
51-
let own_fields = self.field_set();
52-
let other_fields = other.field_set();
53-
!own_fields.is_disjoint(&other_fields)
54-
}
55-
5650
pub fn contains(&self, pos: Pos<i32>) -> bool {
5751
self.fields.contains(&pos)
5852
}

0 commit comments

Comments
 (0)