Function poke_a_mango::ops::state::submit_name [] [src]

pub fn submit_name(s: &mut GameState)

Finalise name editing and sum up the score.

If the supplied argument is not GameOver, it remains unchanged.

Examples

let mut state = GameState::GameOver {
    difficulty: Difficulty::Hard,
    score: 12,
    name: name_input.text().to_string(),
};
state::submit_name(&mut state);