Fix: remove old codes - best record

This commit is contained in:
2018-10-23 23:41:20 +09:00
parent f0dc660018
commit c7a5926b21
16 changed files with 47 additions and 401 deletions
-54
View File
@@ -205,27 +205,6 @@ DBConnectManager.prototype.parseJSONtoHistoryRecord = function(json) {
}
return historyRecordManager;
/*
var startIndex = 0;
var endIndex = jsonRankingList.length;
var recordArray = [];
for(var i = startIndex; i < endIndex; i++) {
var bestRecordRow = [];
var strDate = jsonRankingList[i]['Date'];
var dateArray = strDate.split("-");
var recordDate = new Date(dateArray[0], dateArray[1], dateArray[2]);
bestRecordRow[0] = recordDate.getMonth() + "월 " + recordDate.getDate() + "일";
bestRecordRow[1] = Math.floor(jsonRankingList[i]['BestRecord']);
bestRecordRow[2] = getStageNameForKorean(jsonRankingList[i]['StageName']);
// console.log("$BestRecordRow : " + bestRecordRow[0] + ", " + bestRecordRow[1] + ", " + bestRecordRow[2]);
recordArray.push(bestRecordRow);
}
return recordArray;
*/
}
DBConnectManager.prototype.requestRanking = function(type, maestroID, date, time, listener) {
@@ -367,18 +346,6 @@ DBConnectManager.prototype.requestHowToPlay = function(appID, onSucceededListene
xhr.send("AppID=" + appID);
}
DBConnectManager.prototype.updateTodayBestRecord = function(maestroID, playerID, appID, record) {
var xhr = new XMLHttpRequest();
xhr.open("POST", this.phpPath + "server/record/update_best_record.php", true);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.send(
"MaestroID=" + maestroID
+ "&PlayerID=" + playerID
+ "&AppID=" + appID
+ "&BestRecord=" + record
);
}
DBConnectManager.prototype.updateAppHighestRecord = function(maestroID, playerID, appID, record) {
var xhr = new XMLHttpRequest();
xhr.open("POST", this.phpPath + "server/record/update_app_highest_record.php", true);
@@ -391,27 +358,6 @@ DBConnectManager.prototype.updateAppHighestRecord = function(maestroID, playerID
);
}
DBConnectManager.prototype.requestTodayBestRecord = function(maestroID, playerID, appID, onSucceededListener, onFailedListener) {
var xhr = new XMLHttpRequest();
xhr.open("POST", this.phpPath + "server/record/request_best_record.php", true);
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
xhr.onreadystatechange = function() {
if(xhr.readyState == 4 && xhr.status == 200) {
var replyJSON = JSON.parse(xhr.responseText);
if(replyJSON != null && replyJSON["BestRecord"] != null)
onSucceededListener(replyJSON);
else
onFailedListener(replyJSON);
}
};
xhr.send(
"MaestroID=" + maestroID
+ "&PlayerID=" + playerID
+ "&AppID=" + appID
);
}
DBConnectManager.prototype.requestAppHighestRecord = function(maestroID, playerID, appID, onSucceededListener, onFailedListener) {
var xhr = new XMLHttpRequest();
xhr.open("POST", this.phpPath + "server/record/request_app_highest_record.php", true);
+1 -1
View File
@@ -62,7 +62,7 @@ ScreenBottomUI.prototype.printText = function(textObject, text, align) {
return textObject;
}
ScreenBottomUI.prototype.printLeftTextWithBestRecord = function(bestRecord) {
ScreenBottomUI.prototype.printLeftTextWithAppHighestRecord = function(bestRecord) {
var roundUpBestRecord = Math.round(bestRecord);
var highScoreWithCommas = NumberUtil.numberWithCommas(roundUpBestRecord);
this.printLeftText("최고 기록 : " + highScoreWithCommas);
+6 -130
View File
@@ -83,15 +83,7 @@ SessionStorageManager.prototype.getRecord = function() {
return Number(sessionStorage.getItem("record"));
}
// best record
// SessionStorageManager.prototype.setBestRecord = function(value) {
// sessionStorage.setItem("bestRecord", value);
// }
// SessionStorageManager.prototype.getBestRecord = function() {
// return Number(sessionStorage.getItem("bestRecord"));
// }
// best record
// app highest record
SessionStorageManager.prototype.setAppHighestRecord = function(value) {
sessionStorage.setItem("appHighestRecord", value);
}
@@ -100,11 +92,11 @@ SessionStorageManager.prototype.getAppHighestRecord = function() {
}
// best record
SessionStorageManager.prototype.setIsNewBestRecord = function(value) {
sessionStorage.setItem("isNewBestRecord", value);
SessionStorageManager.prototype.setIsNewAppHighestRecord = function(value) {
sessionStorage.setItem("isNewAppHighestRecord", value);
}
SessionStorageManager.prototype.getIsNewBestRecord = function() {
return sessionStorage.getItem("isNewBestRecord");
SessionStorageManager.prototype.getIsNewAppHighestRecord = function() {
return sessionStorage.getItem("isNewAppHighestRecord");
}
SessionStorageManager.prototype.resetPlayingAppData = function() {
@@ -112,121 +104,5 @@ SessionStorageManager.prototype.resetPlayingAppData = function() {
this.removeItem("playingAppName");
this.removeItem("playingAppKoreanName");
this.removeItem("record");
this.removeItem("bestRecord");
this.removeItem("appHighestRecord");
}
/*
class SessionStorageManager {
constructor() {
}
clear() {
sessionStorage.clear();
}
removeItem(key) {
return sessionStorage.removeItem(key);
}
// maestro ID
set maestroID(value) {
sessionStorage.setItem("maestroID", value);
}
get maestroID() {
return sessionStorage.getItem("maestroID");
}
// maestro account type
set maestroAccountType(value) {
sessionStorage.setItem("maestroAccountType", value);
}
get maestroAccountType() {
return sessionStorage.getItem("maestroAccountType");
}
// player name
set playerName(value) {
sessionStorage.setItem("playerName", value);
}
get playerName() {
return sessionStorage.getItem("playerName");
}
// player player ID
set playerID(value) {
sessionStorage.setItem("playerID", value);
}
get playerID() {
return sessionStorage.getItem("playerID");
}
// player account type
set playerAccountType(value) {
sessionStorage.setItem("playerAccountType", value);
}
get playerAccountType() {
return sessionStorage.getItem("playerAccountType");
}
// playing app id
set playingAppID(value) {
sessionStorage.setItem("playingAppID", value);
}
get playingAppID() {
return sessionStorage.getItem("playingAppID");
}
// playing app name
set playingAppName(value) {
sessionStorage.setItem("playingAppName", value);
}
get playingAppName() {
return sessionStorage.getItem("playingAppName");
}
// playing app korean name
set playingAppKoreanName(value) {
sessionStorage.setItem("playingAppKoreanName", value);
}
get playingAppKoreanName() {
return sessionStorage.getItem("playingAppKoreanName");
}
// record
set record(value) {
sessionStorage.setItem("record", value);
}
get record() {
return sessionStorage.getItem("record");
}
// best record
set bestRecord(value) {
sessionStorage.setItem("bestRecord", value);
}
get bestRecord() {
return sessionStorage.getItem("bestRecord");
}
// best record
set isNewBestRecord(value) {
sessionStorage.setItem("isNewBestRecord", value);
}
get isNewBestRecord() {
return sessionStorage.getItem("isNewBestRecord");
}
resetPlayingAppData() {
sessionStorage.playingAppID = null;
sessionStorage.playingAppName = null;
sessionStorage.playingAppKoreanName = null;
sessionStorage.record = null;
sessionStorage.bestRecord = null;
}
}
*/
}