fix health reset on feeding
This commit is contained in:
		| @@ -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; | ||||
|         } | ||||
|     } | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user