Skip to content

scegob/week11ticTacToe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

week11ticTacToe

https://scegob.github.io/week11ticTacToe/

Being on week 11 which is more than half way done with the Promineo Tech bootcamp we have been working on a lot of projects which ahs been fun. We get to put everything we have learned together to make more complex projects. This week we were told to make a tic-tac-toe application which combines html, css, bootstrap, dom munipulation/ or jquery. The steps for this project were

a. A heading should say whether it is X’s or O’s turn and change with each move made. b. Create a tic-tac-toe grid using your HTML element of choice. When a cell in the grid is clicked, an X or O should appear in that spot depending on whose turn it is. c. A button should be available to clear the grid and restart the game. d. When a player has won, or the board is full and the game results in a draw, a Bootstrap alert or similar Bootstrap component should appear across the screen announcing the winner. Screenshot (254) Tic-Tac-Toe Game Screenshot (255) Winner Message Screenshot (256) Mobile View

A piece of code that I am proud of is below because I was having trouble getting it to change the text of the current player and when I started to make a change it started to give the applications a lot of bugs because I had isPlayerOTurn = to the documentation but once I got rid of the = sign it started to do what I wanted.

function swapTurns() { isPlayerOTurn = !isPlayerOTurn document.getElementById('text-change').innerHTML = It is player ${isPlayerOTurn ? "O": "X"} }

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors