From 7d0fea59441b8b5e57c4bcbefd32ceebfe1c74a6 Mon Sep 17 00:00:00 2001 From: pw6mfljci <2537107798@qq.com> Date: Mon, 17 Jun 2024 19:11:52 +0800 Subject: [PATCH] ADD file via upload --- ranklist.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 ranklist.h diff --git a/ranklist.h b/ranklist.h new file mode 100644 index 0000000..589ecae --- /dev/null +++ b/ranklist.h @@ -0,0 +1,23 @@ +#pragma once + +#include "common.h" +#include + +class RankList +{ +private: + std::vector m_msg; + const std::string m_rankfile = "retro"; + const int MAX_RANK = 10; +public: + RankList(); + + void SaveMsg(PlayerMsg msg); + std::vector getRankList(); + void SaveToRank(); + +private: + void WriteTime(PlayerMsg& msg); + void ReadFile(); + void WriteFile(); +};