From c4655e12c6add37413f62fc29eddc360c831f9e6 Mon Sep 17 00:00:00 2001 From: lescartcheur Date: Mon, 10 Aug 2026 16:25:46 +0200 Subject: [PATCH] fix app --- www/js/MenuFrontEnd.js | 1 + www/js/backend.js | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/www/js/MenuFrontEnd.js b/www/js/MenuFrontEnd.js index 3f8b2f2..f9126e2 100644 --- a/www/js/MenuFrontEnd.js +++ b/www/js/MenuFrontEnd.js @@ -44,6 +44,7 @@ function apply_menu_settings_to_config() { function on_menu_start_game_press() { apply_menu_settings_to_config() hide_scene("Menu") + start_game_initilized() load_Clock_scene() } diff --git a/www/js/backend.js b/www/js/backend.js index 2907280..a2d333a 100644 --- a/www/js/backend.js +++ b/www/js/backend.js @@ -44,6 +44,10 @@ config = { first_time : true } +function start_game_initilized(){ + trais = !config.trais; + toggle_trais() +} function load_endgame_scene(){ has_start = false @@ -74,8 +78,7 @@ function load_menu_scene(){ } function inizalize_clock(){ - trais = !config.trais - toggle_trais() + White.Time = config.StartTimeWhite White.moveLeft = config.StartMoveLeft Black.Time = config.StartTimeBlack @@ -86,6 +89,7 @@ function inizalize_clock(){ if (config.first_time) { config.first_time = false show_start_clock_button() + }else{ start() } @@ -107,6 +111,7 @@ function start(){ } function load_cube_scene(){ + init_Cube() has_start = false config.StartTimeWhite = White.Time @@ -136,6 +141,14 @@ function load_cube_scene(){ } +function init_Cube(){ + black_Timer.classList.remove("RedClick") + black_Timer.classList.remove("GreenClick") + white_Timer.classList.remove("RedClick") + white_Timer.classList.remove("GreenClick") + +} + function black_timer_touch(){ if (!Timer.Black_Has_started){ Timer.coldown_Start_Black = Date.now() @@ -201,6 +214,7 @@ function black_touch(){ if (!has_start) return null Black.moveLeft -= 1 if (Black.moveLeft == 0){ + toggle_trais() load_cube_scene() }else{ toggle_trais()