Pathfinder Game
About this app
A simple, fun game where you guide a character from a start point to an endpoint, avoiding obstacles and hazards.
Pathfinder Game
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>Pathfinder Game</title>
<meta name="description" content="A simple, fun game where you guide a character from a start point to an endpoint, avoiding obstacles and hazards.">
<meta name="keywords" content="game, pathfinder, obstacles, hazards, fun, interactive">
<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, html {
height: 100%;
margin: 0;
font-size: 16px;
font-family: 'Comic Sans MS', sans-serif;
background: linear-gradient(to right, #12c2e9, #c471ed, #f64f59);
}
.game-container {
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
.grid {
display: grid;
grid-template-columns: repeat(5, 1fr);
grid-template-rows: repeat(5, 1fr);
gap: 10px;
width: 300px;
height: 300px;
}
.cell {
border: 1px solid #fff;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
font-size: 24px;
}
.cell.active {
background-color: #f64f59;
}
</style>
<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() {
var grid = document.getElementsByClassName('grid')[0];
var activeCell = null;
// Create cells
for (var i = 0; i < 25; i++) {
var cell = document.createElement('div');
cell.classList.add('cell');
cell.textContent = i+1;
cell.onclick = function() {
if (activeCell) {
activeCell.classList.remove('active');
}
this.classList.add('active');
activeCell = this;
}
grid.appendChild(cell);
}
});
} catch (error) {
// This will throw the error to the parent window.
throw error;
}
</script>
</head>
<body>
<div id="main-container" class="container">
<!-- App HTML Goes Here -->
<div class="game-container">
<div class="grid"></div>
</div>
</div>
</body>
</html>
NEW APPS
These are apps made by the community!