diff --git a/script/game-functions/addStartButtonFunctionality.js b/script/game-functions/addStartButtonFunctionality.js index ebffd92..0550e93 100644 --- a/script/game-functions/addStartButtonFunctionality.js +++ b/script/game-functions/addStartButtonFunctionality.js @@ -2,5 +2,5 @@ export default function addStartButtonFunctionality(game) { const button = document.getElementById('start') - button.addEventListener('click', game) + button.addEventListener('click', () => game(false, false)) } \ No newline at end of file diff --git a/script/game-functions/gameLogic.js b/script/game-functions/gameLogic.js index 63e0313..acb3034 100644 --- a/script/game-functions/gameLogic.js +++ b/script/game-functions/gameLogic.js @@ -8,6 +8,7 @@ export default function gameLogic(checkInputsResult, replay) { function Player(position) { console.log(replay) + console.log(checkInputsResult) if (replay) { diff --git a/script/index.js b/script/index.js index 8aa1759..85972f0 100644 --- a/script/index.js +++ b/script/index.js @@ -32,6 +32,8 @@ function main(game) { function game(checkInputsResult, replay) { + console.log(checkInputsResult) + if (!checkInputsResult) { checkInputsResult = checkInputs()