This is my fork of dionyziz's canvas-tetris. I rewrote the entire code to learn how it worked, but it's originally their's.
This program is released under the MIT License.
A fork of dionyziz's canvas-tetris.
License: MIT License
This is my fork of dionyziz's canvas-tetris. I rewrote the entire code to learn how it worked, but it's originally their's.
This program is released under the MIT License.
Create a random generator.
for(var y = 0; y < sq; ++y){
for(var x = 0; x < sq; ++x){
if(current[y][x]){
contextMain.strokeStyle = minoStroke;
contextMain.fillStyle = colors[current[y][x]-1];
drawBlock(curX + x, curY + y, contextMain);
}
}
}
to
contextMain.strokeStyle = minoStroke;
contextMain.fillStyle = colors[current[y][x]-1];
for(var y = 0; y < sq; ++y){
for(var x = 0; x < sq; ++x){
if(current[y][x]){
drawBlock(curX + x, curY + y, contextMain);
}
}
}
Add themes, skins, colours, etc.
Dark/night mode.
Add 3-5 piece prieviews.
Add score keeping. PHP stuff eventually.
Add anti-clockwise rotate.
Cyan I
Yellow O
Purple T
Green S
Red Z
Blue J
Orange L
"Playfield is 10 cells wide and at least 22 cells tall, where rows above 20 are hidden or obstructed by the field frame." - Tetris Guidelines
""Hold piece": The player can press a button to send the falling tetromino to the hold box, and any tetromino that had been in the hold box moves to the top of the screen and begins falling. Hold cannot be used again until after the piece locks down. Games on platforms with fewer than eight usable buttons (such as the version on iPod) may skip this feature. The combination of hold piece and Random Generator would appear to allow the player to play forever. " - Tetris Guidelines
Increase speed as player advances.
Lower starting speed.
Move the tetromino towards the middle of the matrix if rotated at the edge.
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.