From 1be5c7a12ca56c0411b6a91e57f93d72558d4111 Mon Sep 17 00:00:00 2001 From: cyjullien1 Date: Wed, 8 Jan 2025 14:14:36 +0100 Subject: [PATCH] best sys scoring --- script/function.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/script/function.c b/script/function.c index 0ddf04f..3ad119d 100644 --- a/script/function.c +++ b/script/function.c @@ -951,13 +951,17 @@ unsigned int scoreCalculator(score *score_user, bool win) unsigned int scoreCalculatorCyp(score *score_user, bool win) { - unsigned short int result = 0; //plus grand nombre + unsigned short int result = 10000; //plus grand nombre int time = score_user->after - score_user->before; - result += (score_user->move_box + score_user->move_player) * time; + result -= (score_user->move_box + score_user->move_player) * time; if (!win) { result /= 50; } + if(result <0) + { + result=0; + } return result; }