A Present For Yang & Aaron

Developer
Size
1,880 Kb
Views
20,240

How do I make an a present for yang & aaron?

What is a a present for yang & aaron? How do you make a a present for yang & aaron? This script and codes were developed by Ethan on 22 September 2022, Thursday.

A Present For Yang & Aaron Previews

A Present For Yang & Aaron - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>A Present For Yang & Aaron</title>
</head>
<body> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>

A Present For Yang & Aaron - Script Codes JS Codes

$(document).ready(function() { var avatar = "X", move = 0, player1 = "odds", player2 = "evens", solved = false; $('#reset').click(function reset() { console.log('resetting'); for (var i = 1; i <= 9 ; i++) $('.square').eq(i-1).html(i); avatar = "X", move = 0, player1 = "odds", player2 = "evens", solved = false; $('.status').html(''); }); function checkSolutions() { console.log("move = " + move); if ( ( $('.square').eq(0).html() == $('.square').eq(1).html() ) && ( $('.square').eq(0).html() == $('.square').eq(2).html() ) ) { solved = true; } else if ( ( $('.square').eq(3).html() == $('.square').eq(4).html() ) && ( $('.square').eq(3).html() == $('.square').eq(5).html() ) ) { solved = true; } else if ( ( $('.square').eq(6).html() == $('.square').eq(7).html() ) && ( $('.square').eq(6).html() == $('.square').eq(8).html() ) ) { solved = true; } else if ( ( $('.square').eq(0).html() == $('.square').eq(3).html() ) && ( $('.square').eq(3).html() == $('.square').eq(6).html() ) ) { solved = true; } else if ( ( $('.square').eq(1).html() == $('.square').eq(4).html() ) && ( $('.square').eq(1).html() == $('.square').eq(7).html() ) ) { solved = true; } else if ( ( $('.square').eq(2).html() == $('.square').eq(5).html() ) && ( $('.square').eq(2).html() == $('.square').eq(8).html() ) ) { solved = true; } else if ( ( $('.square').eq(0).html() == $('.square').eq(4).html() ) && ( $('.square').eq(0).html() == $('.square').eq(8).html() ) ) { solved = true; } else if ( ( $('.square').eq(2).html() == $('.square').eq(4).html() ) && ( $('.square').eq(2).html() == $('.square').eq(6).html() ) ) { solved = true; } else if (move == 8) { solved = "tie"; } return solved; } function nextMove() { if (!checkSolutions()) { move++; avatar = move%2==0 ? "X" : "O"; return avatar; } else { console.log(checkSolutions()); (checkSolutions() == "tie") ? $('.status').html("Its a Tie.") : $('.status').html(avatar + " Wins!"); } } $('.square').on('click', function() { if (($(this).html() != "X") && ($(this).html()!="O")) { $(this).html(avatar); nextMove(); } });
});
A Present For Yang & Aaron - Script Codes
A Present For Yang & Aaron - Script Codes
Home Page Home
Developer Ethan
Username pianotiles2
Uploaded September 22, 2022
Rating 3
Size 1,880 Kb
Views 20,240
Do you need developer help for A Present For Yang & Aaron?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Ethan (pianotiles2) Script Codes
Create amazing love letters with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!