Win game logic done

This commit is contained in:
2021-12-27 16:28:27 -03:00
parent 0102f9b106
commit bc65015c21
6 changed files with 148 additions and 14 deletions

View File

@@ -6,6 +6,7 @@ import checkInputs from './game-functions/checkInputs.js'
import disableEnterInputs from './emoji-picker-functions/disableEnterInputs.js'
import hidePlayerSelection from './game-functions/hidePlayerSelection.js'
import showTicTacToe from './game-functions/showTicTacToe.js'
import gameLogic from './game-functions/gameLogic.js'
function main(game) {
@@ -20,13 +21,19 @@ function main(game) {
function game() {
if(checkInputs()) {
const checkInputsResult = checkInputs()
console.log(checkInputsResult)
if(checkInputsResult && typeof(checkInputsResult) === 'boolean') {
return
}
hidePlayerSelection()
showTicTacToe()
gameLogic(checkInputsResult)
}
window.onload = () => main(game)