Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<!-- Using Tailwind CSS is preferred nowadays-->
<header>
<div class="navbar">
<p id="nameOfGame">Connect Four Game</p>
<p id="nameOfGame">Connect Four Game</p>
</div>
</header>
<div id="start" align="center">
Expand Down Expand Up @@ -109,3 +110,4 @@ <h3 class="plyr2 ml-auto"></h3>
<script src="myScripts.js"></script>
</body>
</html>

12 changes: 6 additions & 6 deletions myScripts.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

var playerone,playertwo;
var player1color = 'rgb(244, 65, 65)';
var player2color = 'rgb(66, 134, 244)';
// We prefer to use let keyword instead of var!
let playerone,playertwo;
let player1color = 'rgb(244, 65, 65)';
let player2color = 'rgb(66, 134, 244)';


const startBtn= document.getElementById("start");
Expand Down Expand Up @@ -44,7 +44,7 @@ function makeMove(){
currentColor = player2color;
}
}

//Async Await Function used!
async function namesInput(){
const nameInput=await document.getElementById('nameInput')
nameInput.style.display="none";
Expand Down Expand Up @@ -204,4 +204,4 @@ function startTimer() {
clearInterval(timer);
timer = setInterval(updateTimer, 1000);
updateTimer();
}
}