src/main.rs aktualisiert
This commit is contained in:
parent
2a7cc8269e
commit
0a8c1d9a98
10
src/main.rs
10
src/main.rs
|
@ -12,10 +12,10 @@ fn main(){
|
|||
.read_line(&mut guess)
|
||||
.expect("Failed to read line");
|
||||
if guess.trim().is_empty() {
|
||||
println!("Du kannst nicht cheaten");
|
||||
std::process::exit(0);
|
||||
|
||||
println!("Die opiton ist unknown");
|
||||
}
|
||||
else {
|
||||
|
||||
let guess: u32 = guess.trim().parse().expect("Please type a number!");
|
||||
if guess == secretnumber {
|
||||
println!("Dein score: {}", score);
|
||||
|
@ -29,6 +29,8 @@ fn main(){
|
|||
println!("Du hast überlebt");
|
||||
let _score = score += 1;
|
||||
println!("Der Geist ist hinter der Tür {}", secretnumber);
|
||||
}}
|
||||
}
|
||||
}
|
||||
}
|
||||
println!("Du hast gewonnen");
|
||||
}
|
Loading…
Reference in a new issue