src/main.rs aktualisiert

This is the last update i added win detection
This commit is contained in:
robin 2024-04-06 22:35:58 +02:00
parent c14a85a4e7
commit e6d5d5cde1

View file

@ -21,5 +21,13 @@ fn main(){
println!("Du hast überlebt"); println!("Du hast überlebt");
} }
let _score = score += 1; let _score = score += 1;
if score== 32{
win(32)
} }
}
}
fn win(w:i32) {
println!("Du hast mit {w} gewonnen");
panic!()
} }