Coder Social home page Coder Social logo

parzibyte / tetris-javascript Goto Github PK

View Code? Open in Web Editor NEW
20.0 1.0 12.0 4.23 MB

Nearly perfect port of Tetris in pure JavaScript / Port casi perfecto del juego de tetris en JavaScript puro

Home Page: https://parzibyte.me/blog/2020/11/02/tetris-javascript-open-source/

License: MIT License

HTML 6.24% JavaScript 89.87% CSS 3.89%
tetris game canvas javascript port tetris-game

tetris-javascript's Introduction

tetris-javascript

Tetris escrito con JavaScript. Se usa canvas para dibujar el tablero.

Parzibyte jugando Tetris programado con JavaScript

By parzibyte

Tutorial: https://parzibyte.me/blog/2020/11/02/tetris-javascript-open-source/

Demo: https://parzibyte.github.io/tetris-javascript/

Documentación del estilo de código

Preferimos algo legible a algo "optimizado". Por ejemplo, en lugar de:

return !tablero[y][x].ocupado;

Se prefiere:

if (tablero[y][x].ocupado){
    return false
}else {
    return true;
}

Docs

Absolute point: A point with x and y that is absolute to the game board

Relative point: A point with inner x and y; for example, a point that conforms a figure

Files

script.js: just a legacy code file. It is not necessary at all, it's just to remember the early development of this port

tetris.js: the main file. It contains 3 classes. If you want, you can separate all of them; they are independent.

About

Proudly brought to you by parzibyte (https://parzibyte.me/blog)

tetris-javascript's People

Contributors

parzibyte avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.