Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- [
- [0,1,1], //Pieza S
- [1,1,0]
- ];
- function toPointMatrix(matrix,left, pixelH){
- let newMatrix = matrix;
- for(let i = 0; i < newMatrix.length; i++){
- for(let j = 0; j < newMatrix[i].length; j++){
- if(newMatrix[i][j] !== 0){
- newMatrix[i][j] = left + (pixelH * j);
- }else{
- newMatrix[i][j] = -1;
- }
- }
- }
- return newMatrix;
- }
- console.log(toPointMatrix(SHAPES[num_aleatorio], 0, 40));
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement