-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathrepository.rs
More file actions
91 lines (90 loc) · 2.27 KB
/
repository.rs
File metadata and controls
91 lines (90 loc) · 2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
use crate::models::Game;
pub fn print_games(games: &Vec<Game>) {
for game in games {
println!("{}, {}", game.year, game.title);
}
}
pub fn load_games() -> Vec<Game> {
vec![
Game {
title: String::from("The Legend of Zelda: Breath of the Wild"),
year: 2017,
popularity: 1.5,
},
Game {
title: String::from("Half-Life 2"),
year: 2004,
popularity: 1.6,
},
Game {
title: String::from("The Witcher 3: Wild Hunt"),
year: 2015,
popularity: 1.8,
},
Game {
title: String::from("Dark Souls"),
year: 2011,
popularity: 1.1,
},
Game {
title: String::from("God of War"),
year: 2018,
popularity: 1.25,
},
Game {
title: String::from("Super Mario Odyssey"),
year: 2017,
popularity: 1.9,
},
Game {
title: String::from("Hades"),
year: 2020,
popularity: 2.8,
},
Game {
title: String::from("Resident Evil 4"),
year: 2005,
popularity: 0.9,
},
Game {
title: String::from("Minecraft"),
year: 2009,
popularity: 2.73,
},
Game {
title: String::from("Overwatch"),
year: 2016,
popularity: 1.25,
},
Game {
title: String::from("Grand Theft Auto V"),
year: 2013,
popularity: 1.1,
},
Game {
title: String::from("Animal Crossing: New Horizons"),
year: 2020,
popularity: 1.4,
},
Game {
title: String::from("Elden Ring"),
year: 2022,
popularity: 2.98,
},
Game {
title: String::from("Bloodborne"),
year: 2015,
popularity: 1.12,
},
Game {
title: String::from("Sekiro: Shadows Die Twice"),
year: 2019,
popularity: 0.78,
},
Game {
title: String::from("Mass Effect 2"),
year: 2010,
popularity: 1.98,
},
]
}