Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mod dice {
- use std::collections::HashMap;
- pub struct Dice <'a> {
- face_pieces: HashMap<&'a str, &'a str>,
- }
- impl Dice <'_> {
- pub fn new() -> Dice <'static> {
- Dice {
- face_pieces: [
- ("edge", "# # # # # # #"),
- ("blank", "# #"),
- ("left", "# O #"),
- ("right", "# O #"),
- ("middle", "# O #"),
- ("two", "# O O #"),
- ("three", "# O O O #")]
- .iter().cloned().collect(),
- }
- }
- }
- }
- fn main() {
- let dice = dice::Dice::new();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement