Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created Nov 2, 2020
Embed
What would you like to do?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/all.min.css">
<style>
body {
padding-bottom: 70px;
}
</style>
<title>Tetris en JavaScript by Parzibyte - Jugar tetris en línea</title>
</head>
<body>
<main>
<div class="container-fluid">
<div class="row">
<div class="col-12 text-center">
<h1>Tetris - By Parzibyte</h1>
<h2 id="puntaje">Presiona <kbd>P</kbd> o pulsa el botón para comenzar</h2>
</div>
<div class="col-12 text-center">
<canvas id="canvas"></canvas>
</div>
<div class="col-12 text-center">
<div class="mt-2">
<button id="btnIniciar" class="btn btn-success"><i class="fas fa-play"></i></button>
<button hidden id="btnPausar" class="btn btn-success"><i class="fas fa-pause"></i></button>
<button id="btnIzquierda" class="btn btn-success"><i class="fas fa-arrow-left"></i></button>
<button id="btnAbajo" class="btn btn-success"><i class="fas fa-arrow-down"></i></button>
<button id="btnDerecha" class="btn btn-success"><i class="fas fa-arrow-right"></i></button>
<button id="btnRotar" class="btn btn-success"><i class="fas fa-undo"></i></button>
<button class="btn btn-danger" id="reset">Reset</button>
</div>
</div>
</div>
</div>
</main>
<footer class="px-2 py-2 fixed-bottom bg-dark">
<span class="text-muted">Tetris en JavaScript creado por
<a class="text-white" href="//parzibyte.me/blog">Parzibyte</a>
&nbsp;|&nbsp;
<a target="_blank" class="text-white" href="//github.com/parzibyte/tetris-javascript">
Ver código fuente
</a>
</span>
</footer>
</body>
<script src="js/sweetalert2.min.js"></script>
<script src="js/tetris.js"></script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment