Refactor BestScore and add experiment to .env

This commit is contained in:
2023-10-23 16:12:52 +02:00
parent 7bcd2eed06
commit 1f705f6018
7 changed files with 38 additions and 18 deletions

View File

@@ -1,9 +1,10 @@
#include "Result.h"
#include "BestScore.h"
#include <filesystem>
#include <fstream>
#include <sstream>
#include "Result.h"
#include "Colors.h"
#include "BestScore.h"
#include "DotEnv.h"
#include "CLocale.h"
namespace platform {
@@ -18,8 +19,9 @@ namespace platform {
score += result["score"].get<double>();
}
scoreName = data["score_name"];
if (scoreName == BestScore::scoreName()) {
score /= BestScore::score();
auto best = BestScore::getScore(scoreName);
if (best.first != "") {
score /= best.second;
}
title = data["title"];
duration = data["duration"];