Guest User

Untitled

a guest
May 27th, 2018
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. #[derive(Debug, Clone, Copy)]
  2. enum MapTile {
  3. Dirt,
  4. Grass,
  5. Water,
  6. }
  7.  
  8. #[derive(Debug)]
  9. enum MapTile2 {
  10. Dirt,
  11. Grass,
  12. Water,
  13. }
  14.  
  15. fn main() {
  16. let map = [[MapTile::Dirt; 8]; 8];
  17. let map2: Vec<Vec<MapTile2>> = (0..8)
  18. .map(|_| (0..8).map(|_| MapTile2::Dirt).collect())
  19. .collect();
  20. println!("{:?}", map);
  21. println!("{:?}", map2);
  22. }
Add Comment
Please, Sign In to add comment