From e6d5d5cde15f4f8ff02fbeb097fd96b58179fe11 Mon Sep 17 00:00:00 2001 From: robin Date: Sat, 6 Apr 2024 22:35:58 +0200 Subject: [PATCH] src/main.rs aktualisiert This is the last update i added win detection --- src/main.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/main.rs b/src/main.rs index 7b1ad78..2c85e52 100644 --- a/src/main.rs +++ b/src/main.rs @@ -21,5 +21,13 @@ fn main(){ println!("Du hast überlebt"); } let _score = score += 1; + if score== 32{ + win(32) + } } + } +fn win(w:i32) { + println!("Du hast mit {w} gewonnen"); + panic!() +} \ No newline at end of file