Calculator Tools Calculator Tools
Create

Super Smashing Pups

Nov 12, 2023

About this app

Join Marshall in an epic adventure to save cats and navigate through mazes!

Super Smashing Pups Super Smashing Pups Level: 1 Points: 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>Super Smashing Pups</title>
<meta name="description" content="Join Marshall in an epic adventure to save cats and navigate through mazes!">
<meta name="keywords" content="game, maze, pups, cats, adventure">

<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">

<style>
/* App CSS Goes Here */
body {
font-family: 'Press Start 2P', cursive;
background: #7F7FD5; /* fallback for old browsers */
background: -webkit-linear-gradient(to right, #91EAE4, #86A8E7, #7F7FD5); /* Chrome 10-25, Safari 5.1-6 */
background: linear-gradient(to right, #91EAE4, #86A8E7, #7F7FD5); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
}
#main-container {
text-align: center;
padding-top: 50px;
}
.maze {
display: none;
}
.maze.active {
display: block;
}
.maze img {
width: 100%;
height: auto;
}
</style>

<script type="text/javascript">
try {
// This will run when the DOM is ready.
document.addEventListener("DOMContentLoaded", function() {
var currentLevel = 1;
var totalPoints = 0;
var totalMazeLevels = 54;
var mazeCompleted = false;

function climb() {
totalPoints += 10000;
alert("Climbing complete! You earned 10000 points!");
}

function jumpAndSmash() {
totalPoints += 10000;
alert("Smashing landing! You earned 10000 points!");
}

function moveToNextMaze() {
if (currentLevel <= totalMazeLevels) {
$('.maze').removeClass('active');
$('#maze-' + currentLevel).addClass('active');
if (mazeCompleted) {
currentLevel += 1;
mazeCompleted = false;
}
}
}

function completeMaze() {
totalPoints += 10000;
mazeCompleted = true;
moveToNextMaze();
}

function move(direction) {
if (direction === 'up') {
climb();
} else if (direction === 'right') {
jumpAndSmash();
} else if (direction === 'down' || direction === 'left') {
return;
}
}

document.onkeydown = function(e) {
switch (e.keyCode) {
case 37:
move('left');
break;
case 38:
move('up');
break;
case 39:
move('right');
break;
case 40:
move('down');
break;
}
};
});

} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>
</head>
<body>
<div id="main-container" class="container">
<h1>Super Smashing Pups</h1>
<h2>Level: <span id="level">1</span></h2>
<h2>Points: <span id="points">0</span></h2>
<div class="maze active" id="maze-1">
<img src="maze1.png" alt="Maze 1">
</div>
<!-- Repeat for all mazes -->
<div class="maze" id="maze-54">
<img src="maze54.png" alt="Maze 54">
</div>
</div>
</body>
</html>