From 809351e6a564f77f4bf2beb63acd0b72a35cdd61 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sun, 2 Jun 2024 12:25:22 +0200 Subject: [PATCH] factor compute_tscore in tactic and yendor --- yendor.cpp | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/yendor.cpp b/yendor.cpp index 5e8dce1d..6c178c0c 100644 --- a/yendor.cpp +++ b/yendor.cpp @@ -122,11 +122,15 @@ EX namespace yendor { int tscorelast; - EX void uploadScore() { + EX int compute_tscore(modecode_t mc) { int tscore = 0; for(int i=1; i tscorelast) { tscorelast = tscore; @@ -780,11 +784,15 @@ EX namespace tactic { int tscorelast; - void uploadScoreCode(int code, int lb) { + int compute_tscore(modecode_t code) { int tscore = 0; for(int i=0; i tscorelast) { tscorelast = tscore;