MCPcopy Create free account
hub / github.com/CleanCut/invaders / new

Method new

src/menu.rs:9–14  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

7
8impl 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 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected