Internet Programming

profilelambertminko
TicTacToeApp.pdf

Build the Tic Tac Toe app For this project, you will build a single-page app that uses model binding to pass data between controllers and views.

Specifications  When the app starts, it should display nine <button> elements, styled as above to appear as a 3-x-3

grid. Above the grid, an <h2> 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 <button> 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 <h2> 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 <h2> 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 <h2> element with a New Game link.

 When the user clicks the New Game link, a new grid of <button> elements should display. Above the grid, an <h2> element should say that it’s X’s turn.