Add: AppInfoManager

This commit is contained in:
2018-05-09 10:08:09 +09:00
parent 024e114077
commit f44cabcb01
13 changed files with 124 additions and 16 deletions
+37
View File
@@ -0,0 +1,37 @@
class AppInfo {
constructor(name, nameKorean) {
this.name = name;
this.nameKorean = nameKorean;
this.isActivated = false;
}
}
class AppInfoManager {
constructor() {
this.appInfoMap = new Map();
this.registerAppInfoList();
}
registerAppInfoList() {
this.registerAppInfo(new AppInfo("login", "로그인"));
this.registerAppInfo(new AppInfo("menu", "메뉴"));
this.registerAppInfo(new AppInfo("test", "테스트"));
this.registerAppInfo(new AppInfo("space_invaders", "외계인 침공"));
this.registerAppInfo(new AppInfo("card_matching", "카드 짝 맞추기"));
}
registerAppInfo(appInfo) {
this.appInfoMap[appInfo.name] = appInfo;
}
getAppNameKorean(name) {
return this.appInfoMap[name].nameKorean;
}
}