From 796195fbacce2c6c1ba108e5b500cc90b6af0ed2 Mon Sep 17 00:00:00 2001 From: pw6mfljci <2537107798@qq.com> Date: Tue, 18 Jun 2024 21:53:12 +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(); +};