Calculator Tools Calculator Tools
Create

JunyTony vs JunyTony

Sep 18, 2023

About this app

A fun and interactive game where JunyTony battles against himself!

JunyTony vs JunyTony JunyTony vs JunyTony Player 1 0 Player 2 0

Related apps

Put this on your site

Source

                    <html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1">

<title>JunyTony vs JunyTony</title>
<meta name="description" content="A fun and interactive game where JunyTony battles against himself!">
<meta name="keywords" content="game, battle, JunyTony">

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap" rel="stylesheet">

<script type="text/javascript">
try {
// App Javascript Goes Here. Place your entire script content inside the try block for error handling.
const gameContainer = document.getElementById('game-container');
const player1Score = document.getElementById('player1-score');
const player2Score = document.getElementById('player2-score');
const player1Button = document.getElementById('player1-button');
const player2Button = document.getElementById('player2-button');
let score1 = 0;
let score2 = 0;

player1Button.addEventListener('click', () => {
score1++;
player1Score.innerText = score1;
});

player2Button.addEventListener('click', () => {
score2++;
player2Score.innerText = score2;
});

} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>

<style>
/* App CSS Goes Here */
body {
background-color: #f5f5f5;
font-family: 'Roboto', sans-serif;
}

#main-container {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}

.game-box {
display: flex;
flex-direction: column;
align-items: center;
width: 300px;
background-color: #fff;
border-radius: 10px;
box-shadow: 0px 2px 10px rgba(0, 0, 0, 0.1);
padding: 20px;
}

.player-button {
display: flex;
justify-content: center;
align-items: center;
width: 100px;
height: 100px;
background-color: #41b883;
border-radius: 50%;
color: #fff;
font-size: 24px;
font-weight: bold;
cursor: pointer;
transition: background-color 0.3s;
}

.player-score {
margin-top: 20px;
font-size: 36px;
font-weight: bold;
color: #41b883;
}

.player-button:hover {
background-color: #2f8e68;
}
</style>
</head>
<body>
<div id="main-container">
<div id="game-container" class="game-box">
<div>
<h1>JunyTony vs JunyTony</h1>
</div>
<div>
<button id="player1-button" class="player-button">Player 1</button>
<span id="player1-score" class="player-score">0</span>
</div>
<div>
<button id="player2-button" class="player-button">Player 2</button>
<span id="player2-score" class="player-score">0</span>
</div>
</div>
</div>
</body>
</html>