Start from scratch with a new simulation #1

Merged
max merged 31 commits from restart into main 2025-04-25 15:03:09 +02:00
Showing only changes of commit d858d88e76 - Show all commits

View File

@ -458,12 +458,12 @@ impl Snake {
pub fn advance(&mut self, head: Coord) {
self.body.push_back(head);
self.body.pop_front();
self.health = 100;
}
pub fn feed(&mut self) {
if let Some(tail) = self.body.front() {
self.body.push_front(*tail);
self.health = 100;
}
}
}