When the app starts, it should display nine elements, styled as above to appear as a 3-x-3 grid. Above the grid, an
Need assignment help for this question?
If you need assistance with writing your essay, we are ready to help you!
element should say that it’s X’s turn. When the user clicks a button, the page should post to the server, where the X or O for that button is saved. When the page re-loads, the clicked element should be marked X or O and should be disabled. In addition, clicking the browser’s Refresh button should redisplay the page, not post the previous click again. After each turn, the element above the grid should say whose turn it is. When there are three Xs or three Os in a line (vertically, horizontally, or diagonally), the game is over and the player with the three marks in a line wins. When this happens, the app should say who won and replace the
element with a New Game link. When there are no more blank cells but there’s no winner, then the game ends in a tie. When this happens, the app should notify the user and replace the
element with a New Game link. When the user clicks the New Game link, a new grid of
elements should display. Above the grid, an
element should say that it’s X’s turn.