()
| 7 | |
| 8 | impl Menu { |
| 9 | pub fn new() -> Self { |
| 10 | Self { |
| 11 | options: vec![String::from("New game"), String::from("Exit")], |
| 12 | selection: 0, |
| 13 | } |
| 14 | } |
| 15 | |
| 16 | pub fn change_option(&mut self, upwards: bool) { |
| 17 | if upwards && self.selection > 0 { |
nothing calls this directly
no outgoing calls
no test coverage detected