mohamednaser / Tic-Tac-Toe

Tic Tac Toe

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Little improvements

Israel-Laguan opened this issue · comments

  • Cell HTML markup too large

    const htmlCeil = `<div class='board-cell cursor-pointer' onclick="game.move(this)" id="${x},${y}"> ${boardArray[x][y]}</div>`;

  • What about move all the "erase" logic into board.initialize()?

    Tic-Tac-Toe/js/custom.js

    Lines 38 to 39 in 1b8003c

    boardArrayDiv.innerHTML = '';
    winnerDiv.innerHTML = '';

  • There is a typo, should be selectedRowColumnArray

    const selectedRowColumeArray = selectedCell.id.split(',');