Add: print sample - graph, ranking
This commit is contained in:
@@ -3,7 +3,12 @@
|
||||
|
||||
class RankingBoard {
|
||||
|
||||
constructor() {
|
||||
constructor(type) {
|
||||
if(type === RecordBoard.TYPE_SAMPLE) {
|
||||
this.printSample();
|
||||
return;
|
||||
}
|
||||
|
||||
this.dbConnectManager = new DBConnectManager();
|
||||
|
||||
this.requestRanking(DBConnectManager.TYPE_MY_RANKING_HOUR);
|
||||
@@ -148,4 +153,56 @@ class RankingBoard {
|
||||
return game.world.height / 2 + 90 + 30 * index;
|
||||
}
|
||||
|
||||
printSample() {
|
||||
// TYPE_MY_RANKING_HOUR
|
||||
this.printRecord(
|
||||
DBConnectManager.TYPE_MY_RANKING_HOUR, 0,
|
||||
new RankingRecord(1, 0, "홍길동", 1080)
|
||||
);
|
||||
this.printRecord(
|
||||
DBConnectManager.TYPE_MY_RANKING_HOUR, 1,
|
||||
new RankingRecord(2, 0, "3-1김영희", 860)
|
||||
);
|
||||
this.printRecord(
|
||||
DBConnectManager.TYPE_MY_RANKING_HOUR, 2,
|
||||
new RankingRecord(3, 0, "6-3이철수", 480)
|
||||
);
|
||||
|
||||
|
||||
// TYPE_MY_RANKING_DAY
|
||||
this.printRecord(
|
||||
DBConnectManager.TYPE_MY_RANKING_DAY, 0,
|
||||
new RankingRecord(1, 0, "050215", 1580)
|
||||
);
|
||||
this.printRecord(
|
||||
DBConnectManager.TYPE_MY_RANKING_DAY, 1,
|
||||
new RankingRecord(2, 0, "홍길동", 1080)
|
||||
);
|
||||
this.printRecord(
|
||||
DBConnectManager.TYPE_MY_RANKING_DAY, 2,
|
||||
new RankingRecord(3, 0, "3-1김영희", 860)
|
||||
);
|
||||
this.printRecord(
|
||||
DBConnectManager.TYPE_MY_RANKING_DAY, 3,
|
||||
new RankingRecord(4, 0, "6-3이철수", 480)
|
||||
);
|
||||
|
||||
// TYPE_MY_RANKING_MONTH
|
||||
this.printRecord(
|
||||
DBConnectManager.TYPE_MY_RANKING_MONTH, 0,
|
||||
new RankingRecord(1, 0, "050215", 1580)
|
||||
);
|
||||
this.printRecord(
|
||||
DBConnectManager.TYPE_MY_RANKING_MONTH, 1,
|
||||
new RankingRecord(2, 0, "홍길동", 1080)
|
||||
);
|
||||
this.printRecord(
|
||||
DBConnectManager.TYPE_MY_RANKING_MONTH, 2,
|
||||
new RankingRecord(3, 0, "3-1김영희", 860)
|
||||
);
|
||||
this.printRecord(
|
||||
DBConnectManager.TYPE_MY_RANKING_MONTH, 3,
|
||||
new RankingRecord(4, 0, "6-3이철수", 480)
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user