Created
March 9, 2023 18:52
-
-
Save raphael-brand/7e4a664b197ac91c756676274c0656bf to your computer and use it in GitHub Desktop.
Rust - Rock Paper Scissors
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let result = vec![ | |
("paper", "paper"), | |
("paper", "scissor"), | |
("paper", "stone"), | |
("scissor", "paper"), | |
("scissor", "scissor"), | |
("scissor", "stone"), | |
("stone", "paper"), | |
("stone", "scissor"), | |
("stone", "stone"), | |
]; | |
for (symbol1, symbol2) in result { | |
println!("Symbol 1: {}, Symbol 2: {}", symbol1, symbol2); | |
// Do something with the symbols | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment