Calculator Tools Calculator Tools
Create

JunyTony's Tycoon

Sep 20, 2023

About this app

Experience the thrill of building your own empire in JunyTony's Tycoon. Join JunyTony in this Minecraft-inspired tycoon game and become a tycoon yourself!

JunyTony's Tycoon

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's Tycoon</title>
<meta name="description" content="Experience the thrill of building your own empire in JunyTony's Tycoon. Join JunyTony in this Minecraft-inspired tycoon game and become a tycoon yourself!">
<meta name="keywords" content="JunyTony, Tycoon, Minecraft, game, empire, building, fun">

<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=Press+Start+2P&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.

// This will run when the DOM is ready.
document.addEventListener("DOMContentLoaded", function() {
// Function to start the tycoon game
function startTycoon() {
// Display game interface
$("#main-container").html(`
<h1>Welcome to JunyTony's Tycoon</h1>
<p>Build your empire and become a tycoon!</p>
<button class="btn btn-primary">Start Game</button>
`);

// Add event listener to start game button
$(".btn").click(function() {
// Start the game logic
startGame();
});
}

// Function to start the game
function startGame() {
// Display game elements
$("#main-container").html(`
<h1>JunyTony's Tycoon</h1>
<p>Click on the resources below to collect them and build your empire!</p>
<div class="resources">
<div class="resource">
<img src="https://emojipedia-us.s3.dualstack.us-west-1.amazonaws.com/thumbs/240/apple/285/seedling_1f331.png" alt="Seedling" />
<p>Seeds: 0</p>
<button class="collect-btn">Collect</button>
</div>
<div class="resource">
<img src="https://emojipedia-us.s3.dualstack.us-west-1.amazonaws.com/thumbs/240/apple/285/house_1f3e0.png" alt="House" />
<p>Houses: 0</p>
<button class="collect-btn">Collect</button>
</div>
</div>
`);

// Add event listener to collect buttons
$(".collect-btn").click(function() {
// Increment resource count
let resourceCount = parseInt($(this).prev().text().split(":")[1].trim());
resourceCount++;
$(this).prev().text(`Count: ${resourceCount}`);
});
}

// Start the tycoon game
startTycoon();
});

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

<style>
/* App CSS Goes Here */
body {
background-color: #f8f8f8;
font-family: 'Press Start 2P', cursive;
}

#main-container {
text-align: center;
margin-top: 50px;
}

h1 {
color: #ff5555;
font-size: 24px;
}

p {
color: #333333;
font-size: 18px;
}

.btn {
background-color: #ff5555;
color: #ffffff;
font-size: 16px;
padding: 10px 20px;
border: none;
cursor: pointer;
}

.resources {
display: flex;
justify-content: center;
margin-top: 50px;
}

.resource {
margin: 0 20px;
padding: 20px;
background-color: #ffffff;
border-radius: 10px;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.resource img {
width: 80px;
height: 80px;
margin-bottom: 10px;
}

.resource p {
color: #333333;
font-size: 16px;
}

.collect-btn {
background-color: #ff5555;
color: #ffffff;
font-size: 14px;
padding: 8px 16px;
border: none;
cursor: pointer;
border-radius: 5px;
}
</style>
</head>
<body>
<div id="main-container" class="container">
<!-- App HTML Goes Here -->
</div>
</body>
</html>