From be2f7b821fc9c74aa73ab6412cffe70de9851f99 Mon Sep 17 00:00:00 2001 From: Richard Halsall <–richard-glyn.halsall@informatik.hs-fulda.e> Date: Wed, 8 Feb 2023 16:20:34 +0100 Subject: [PATCH] =?UTF-8?q?Refactoring:=20Ausblenden=20des=20Startmen?= =?UTF-8?q?=C3=BCs=20durch=20eine=20einzige=20Funktion?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- schlangen_und_leitern/js/Bridge.js | 10 ++-------- schlangen_und_leitern/js/makeBoard.js | 11 +++++++++++ 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/schlangen_und_leitern/js/Bridge.js b/schlangen_und_leitern/js/Bridge.js index 2117b7f..13c4e79 100644 --- a/schlangen_und_leitern/js/Bridge.js +++ b/schlangen_und_leitern/js/Bridge.js @@ -2,14 +2,8 @@ let turnCount = 1; function init(playerCount){ - //playerselect versctecken - document.getElementById("2Player").style.display = "none"; - document.getElementById("3Player").style.display = "none"; - document.getElementById("4Player").style.display = "none"; - document.getElementById("isUp").style.display = "block"; - - // Wufelbereich zeigen. - document.getElementById("würfelBereich").style.display = "grid"; + //hide menue + hideStartMenu() // Spielbrett Aufbauen boardArr = buildBoard(); diff --git a/schlangen_und_leitern/js/makeBoard.js b/schlangen_und_leitern/js/makeBoard.js index 26fda34..29637c8 100644 --- a/schlangen_und_leitern/js/makeBoard.js +++ b/schlangen_und_leitern/js/makeBoard.js @@ -286,6 +286,17 @@ function continueGame (){ } +function hideStartMenu(){ + //playerselect versctecken + document.getElementById("2Player").style.display = "none"; + document.getElementById("3Player").style.display = "none"; + document.getElementById("4Player").style.display = "none"; + document.getElementById("isUp").style.display = "block"; + + // Wufelbereich zeigen. + document.getElementById("würfelBereich").style.display = "grid"; +} +