Advertisement
Guest User

Untitled

a guest
Sep 16th, 2019
111
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. mod dice {
  2. use std::collections::HashMap;
  3. pub struct Dice <'a> {
  4. face_pieces: HashMap<&'a str, &'a str>,
  5.  
  6. }
  7.  
  8. impl Dice <'_> {
  9. pub fn new() -> Dice <'static> {
  10. Dice {
  11. face_pieces: [
  12. ("edge", "# # # # # # #"),
  13. ("blank", "# #"),
  14. ("left", "# O #"),
  15. ("right", "# O #"),
  16. ("middle", "# O #"),
  17. ("two", "# O O #"),
  18. ("three", "# O O O #")]
  19. .iter().cloned().collect(),
  20. }
  21. }
  22. }
  23. }
  24.  
  25. fn main() {
  26. let dice = dice::Dice::new();
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement