mirror of
https://github.com/FranP-code/Tic-Tac-Toe-Game.git
synced 2025-10-12 23:52:39 +00:00
Win game logic done
This commit is contained in:
@@ -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)
|
||||
Reference in New Issue
Block a user