-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathGame.pde
More file actions
113 lines (90 loc) · 2.74 KB
/
Game.pde
File metadata and controls
113 lines (90 loc) · 2.74 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
// Maxwell Sherman & Vincent Lombardi
// Final Project: Censored Games
// CPSC 313-01 Data Visualization
// 2020-05-04
public class Game {
private String title;
private String series;
private ArrayList<String> country;
private ArrayList<String> category;
private ArrayList<String> status;
private String dev;
private String publisher;
private String genreRaw;
private String[] genre;
// Constructor
public Game(String title, String series, String country, String category, String status, String dev, String publisher, String genreRaw) {
this.title = title;
this.series = series;
this.country = new ArrayList<String>();
this.category = new ArrayList<String>();
this.status = new ArrayList<String>();
this.dev = dev;
this.publisher = publisher;
this.genreRaw = genreRaw;
this.genre = genreRaw.split("\\|");
this.addInstance(country, category, status);
}
/*
// Constructor
public Game(String title, String series, String dev, String publisher, String genreRaw) {
this.title = title;
this.series = series;
this.country = new ArrayList<String>();
this.category = new ArrayList<String>();
this.status = new ArrayList<String>();
this.dev = dev;
this.publisher = publisher;
this.genreRaw = genreRaw;
this.genre = genreRaw.split("|");
}
*/
public void addInstance(String c, String cat, String s){
this.country.add(c);
this.category.add(cat);
this.status.add(s);
}
public String getTitle(){
return this.title;
}
public String getSeries(){
return this.series;
}
public float getBannedCount(){
return this.country.size();
}
public String getCountry(int i){
return this.country.get(i);
}
public String getCategory(int i){
return this.category.get(i);
}
public String getStatus(int i){
return this.status.get(i);
}
public String getDev(){
return this.dev;
}
public String getPublisher(){
return this.publisher;
}
public String getGenre(){
return this.genreRaw;
}
public Boolean isGenre(String target){
//println(target);
//println(genreRaw);
for(String s : genre){
if(s.equals(target)){
return true;
}
}
return false;
}
public Boolean isNation(String target){
if(country.contains(target)){
return(true);
}
return false;
}
}