diff --git a/games/game.css b/games/game.css new file mode 100644 index 0000000..3269ee9 --- /dev/null +++ b/games/game.css @@ -0,0 +1,41 @@ + +.playerDiv{ + width: 450px; + box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2); + transition: 0.3s; + margin-left: 32.5%; + margin-bottom: 5%; + +} +.player{ + width: 200px; + height: 60px; + font-size: 20px; + font-family: monospace; + color: brown; + + margin: 5px; + background: #ccc; + border: none; + float: left; +} +.main{ + width: 490px; + box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2); + transition: 0.3s; + margin-left: 30%; + margin-top: 5%; + +} +.btn{ + + width: 150px; + height: 150px; + background: #ccc; + border: none; + margin: 5px; + font-size: 1px; + color: brown; + + +} diff --git a/games/game.html b/games/game.html new file mode 100644 index 0000000..d26fab6 --- /dev/null +++ b/games/game.html @@ -0,0 +1,51 @@ + + + + + Xo game + + + + + + +
+
+

Player 1:

+
+ +
+

Player 2:

+
+ +
+
+
+
+ + + +
+
+ + + +
+ +
+ + + +
+ + + +
+ + + --> + + + + + \ No newline at end of file diff --git a/games/gamejs.js b/games/gamejs.js new file mode 100644 index 0000000..6914112 --- /dev/null +++ b/games/gamejs.js @@ -0,0 +1,109 @@ +var btns = document.querySelectorAll('button'); +var score=document.getElementsByClassName("player"); +var XO = 'x'; +var win1=0; +var win2=0; +var NoOneWon=0; +var player=[]; +var AI=[]; +for(i = 0; i