Skip to content

Instantly share code, notes, and snippets.

@raphael-brand
Created March 9, 2023 18:52
Show Gist options
  • Save raphael-brand/7e4a664b197ac91c756676274c0656bf to your computer and use it in GitHub Desktop.
Save raphael-brand/7e4a664b197ac91c756676274c0656bf to your computer and use it in GitHub Desktop.
Rust - Rock Paper Scissors
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