A Present For Yang & Aaron
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 - 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(); } });
});
Developer | Ethan |
Username | pianotiles2 |
Uploaded | September 22, 2022 |
Rating | 3 |
Size | 1,880 Kb |
Views | 20,240 |
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!
Name | Size |
Solar System | 127,035 Kb |
Jigglypuff | 4,027 Kb |
UNSTABLE ATOMS | 3,797 Kb |
Rubix cube | 11,628 Kb |
Guess Da Numba | 4,732 Kb |
Stat Battles | 10,854 Kb |
Music Particles | 6,148 Kb |
Wallpaper | 33,091 Kb |
Weather Weather | 3,531 Kb |
Particle Swarm | 8,522 Kb |
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!
Name | Username | Size |
Bootstrap Carousel Fade Transition | Rowno | 2,484 Kb |
Polygon Dodecahedron in CSS | Vennsoh | 7,606 Kb |
Flex Chart | James_zedd | 4,111 Kb |
Donut Chart example - MorrisJS | Capelo | 2,385 Kb |
A cube | KyleDavidE | 18,627 Kb |
BSP Dungeon Generation | Xgundam05 | 5,326 Kb |
CSS Piano | Dannystyle | 5,138 Kb |
SnappySnippet Test | Elmsoftware | 8,385 Kb |
Console fun | Dviate | 1,500 Kb |
Calculator - codevember 08 - 2016 | Caiocares | 3,260 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!