main.rs aktualisiert
This commit is contained in:
parent
51c9af4501
commit
6fb18176e4
6
main.rs
6
main.rs
|
@ -4,13 +4,13 @@ loop {
|
||||||
println!("Eine von ihnen tötet dich ");
|
println!("Eine von ihnen tötet dich ");
|
||||||
println!("Durch welche gehst du?");
|
println!("Durch welche gehst du?");
|
||||||
println!("Gib eine Zahl zwischen 1 und 3 ein");
|
println!("Gib eine Zahl zwischen 1 und 3 ein");
|
||||||
let mut secretnumber: i32 = rand::thread_rng().gen_range(1..=3);
|
let mut secretnumber = rand::thread_rng().gen_range(1..=3);
|
||||||
let mut guess = String::new();
|
let mut guess = String::new();
|
||||||
if guess > 3 {
|
if guess > 3 {
|
||||||
println!("Die Tür gibt es nicht");
|
println!("Die Tür gibt es nicht");
|
||||||
}; else if guess = secretnumber{
|
}; else if guess = secretnumber{
|
||||||
println!("Du bist tot")
|
println!("Du bist tot");
|
||||||
false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue