melcor76 / js-tetris Goto Github PK
View Code? Open in Web Editor NEWRead the article of how to make JavaScript Tetris:
Read the article of how to make JavaScript Tetris:
Hello,
Thanks for writing the JS-Tetris tutorial. When using Safari, I am receiving errors in the classes. I also ran your code from Github and received the same errors. There are no errors in Chrome. I am running this on a localhost server. I rarely use classes, so I don't know how to correct the errors.
Error Messages while running your code in Safari:
Text version of errors
[Error] SyntaxError: Unexpected token ';'. Expected an opening '(' before a method's parameter list. (anonymous function) (board.js:2) [Error] SyntaxError: Unexpected token ';'. Expected an opening '(' before a method's parameter list. (anonymous function) (piece.js:2) [Error] ReferenceError: Can't find variable: Board Global Code (main.js:37) [Log] Live reload enabled. (127.0.0.1, line 66) [Error] ReferenceError: Cannot access uninitialized variable. resetGame (main.js:80) play (main.js:85) onclick (127.0.0.1:32) [Error] ReferenceError: Cannot access uninitialized variable. resetGame (main.js:80) play (main.js:85) onclick (127.0.0.1:32)
Environment:
The pieces should move one position at a time.
OS: Mac
Browser: Chrome
Hi,
I was going through the code and in constants.js i saw that it would be neat to have the the Object.freeze been called at a single place i.e. having an array of the items that need to be freezed then run a forEach loop calling the Object.freeze method. I would love to do this if you find it helpful.
there is some bugs when new game starts
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.