From 682cd4c82c7de352cbebf966431f3fd0934f94d6 Mon Sep 17 00:00:00 2001 From: caglenoah Date: Tue, 20 Jun 2023 21:53:35 -0600 Subject: [PATCH 1/2] post tutor --- .DS_Store | Bin 0 -> 6148 bytes index.html | 14 ++++++++++++-- scripts.js | 18 +++++++----------- tictactoe.css | 2 +- 4 files changed, 20 insertions(+), 14 deletions(-) create mode 100644 .DS_Store diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..8dcf83abeba0cbf10df48f96a47b3c9cf3552ece GIT binary patch literal 6148 zcmeHKJx{|h5WQ<72!f#_NDO9SMCw0Ct1uwOiXGZi1*wrM6__)#vNEvnADECB_+PxU ztu}558wjC0>HM7gurDuBE+!%#-W7eK9ucKb!OjkbFGT#J4e12S9*|{?`K&*h*mBW` zRKs6oK%QMfCp4oQx{aP6zZ}$krOos4+>T*O2WM{&7e^n1*k63>UtHJTjjll|ZDZei zTGE6p6*P@@CpvCM)N6Qpe6^v5jde=9uB1IGs>i+mv;_`Ix&jwdT1M6I;W?^_{PkMi zpI5bP#H=f6i;3!BgKbol0cAiL_;Ci%vqjQfk2)#?%78MkVnDtR1}c~ZtUS6;2L^Wp z046Xy!CcM~l4Am90V|L2K-i}OeJY0|2K#i_O^C|^RvvvivD+Ezgq=B@P}uDbyK&*f znMWO!0c9X&pzAMt(*IA}&;N0fUMU00z`tUElYEp9aZ91MHf~OOt$|)bMI^5BxJtpq hwPM6dE8d4Xf!)Xim<6mn!UEAB0Y`%l%D}HO@Cg}FWZM7$ literal 0 HcmV?d00001 diff --git a/index.html b/index.html index 19d0dee..b3dbcc9 100644 --- a/index.html +++ b/index.html @@ -20,8 +20,18 @@

Welcome to Tic Tac Toe

- - + + + + + + + + + + + + diff --git a/scripts.js b/scripts.js index ba09e74..483b7e8 100644 --- a/scripts.js +++ b/scripts.js @@ -1,7 +1,3 @@ -// *********************** -// INSTRUCTIONS -// *********************** - // 1. Read the code below one block at a time. // 2. Look for the @TODOs, and figure out how to fix them. // next to each @TODO you will find tasks that need to be finished @@ -44,12 +40,12 @@ const addMarker = (id) => { console.log(`Therefore, a "${currentMarker}" should be placed in the square with the id: ${id}`) // @TODO-2: Build a line of code that will set the innerHTML property of the element that was clicked to the "currentMarker" - +document.getElementById(id).innerHTML = currentMarker // @TODO-2.5: MIX & MATCH, You will need the following pieces of code to build that line: - // = currentMarker - // .getElementById(id) - // document - // .innerHTML + //= currentMarker + //.getElementById(id) + //document + //.innerHTML changeMarker() } @@ -86,7 +82,7 @@ const resetBoard = () => { // @TODO-3: To make your "Restart" button work you'll need to build a line of code here that: // collects all of the "td" elements into an HTML Collection: https://www.w3schools.com/jsref/dom_obj_htmlcollection.asp - + const squares = document.getElementsByTagName("TD") // @TODO-3.5: MIX & MATCH, You will need the following pieces of code to build that line: // squares // .getElementsByTagName("TD") @@ -103,4 +99,4 @@ const resetBoard = () => { // sets the innerHTML to null to replace the "X" or "O" squares[i].innerHTML = null } -} \ No newline at end of file +} diff --git a/tictactoe.css b/tictactoe.css index 981de05..d1a31b7 100644 --- a/tictactoe.css +++ b/tictactoe.css @@ -13,4 +13,4 @@ td { table { margin: auto auto; -} \ No newline at end of file +} From 19120689ffe8b5f87c9cf2030168ac43628b65f0 Mon Sep 17 00:00:00 2001 From: caglenoah Date: Wed, 5 Jul 2023 12:24:00 -0600 Subject: [PATCH 2/2] upadate --- .DS_Store | Bin 6148 -> 6148 bytes scripts.js | 2 ++ 2 files changed, 2 insertions(+) diff --git a/.DS_Store b/.DS_Store index 8dcf83abeba0cbf10df48f96a47b3c9cf3552ece..944bbd9b9f373a42b25eadaa3939f850b4f41424 100644 GIT binary patch delta 106 zcmZoMXffEJ#uU5Rmw|zSg+Y%YogtH%}kA=001->)&Kwi delta 106 zcmZoMXffEJ#uU3$l7WGNg+Y%YogtHeRPm@Is(cDw`GO3? U;N<+=0-zoS24;oL%}kA=0Be>Ri~s-t diff --git a/scripts.js b/scripts.js index 483b7e8..69c4904 100644 --- a/scripts.js +++ b/scripts.js @@ -100,3 +100,5 @@ const resetBoard = () => { squares[i].innerHTML = null } } + +//need check for win