(random: u8)
| 28 | |
| 29 | impl SnakeState { |
| 30 | pub fn new(random: u8) -> Self { |
| 31 | SnakeState { |
| 32 | head: (4, 0), |
| 33 | direction: HeadDirection::Down, |
| 34 | body: Vec::new(), |
| 35 | game_over: false, |
| 36 | food: place_food(random), |
| 37 | } |
| 38 | } |
| 39 | pub fn tick(&mut self, random: u8) { |
| 40 | if self.game_over { |
| 41 | return; |
nothing calls this directly
no test coverage detected