File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change @@ -168,7 +168,7 @@ function createPiece(type) {
168168 [ 0 , 0 , 0 ] ,
169169 [ 0 , 12 , 12 ] ,
170170 ] ;
171- } else if ( type = 'K' ) {
171+ } else if ( type === 'K' ) {
172172 return [
173173 [ 0 , 13 , 13 ] ,
174174 [ 0 , 0 , 0 ] ,
@@ -226,12 +226,6 @@ function drawNextPiece(piece) {
226226
227227// Canvas background colors
228228function draw ( ) {
229- if ( ( player . score !== 0 && player . score % 5 === 0 ) || insaneMode === true || hardMode === true ) {
230- pieces = 'TJLOSZIWXYQEK' ;
231- } else {
232- pieces = 'TJLOSZI' ;
233- }
234- console . log ( pieces ) ;
235229 if ( artMode ) {
236230 context . fillStyle = 'transparent' ;
237231 } else if ( brookeMode ) {
@@ -322,6 +316,11 @@ function playerMove(offset) {
322316
323317// Creates New Piece
324318function playerReset ( ) {
319+ if ( ( player . score !== 0 && player . score % 5 === 0 ) || insaneMode === true || hardMode === true ) {
320+ pieces = 'TJLOSZIWXYQEK' ;
321+ } else {
322+ pieces = 'TJLOSZI' ;
323+ }
325324 player . matrix = nextPiece [ 0 ] ;
326325 player . pos . y = 0 ;
327326 player . pos . x = ( arena [ 0 ] . length / 2 | 0 ) - ( player . matrix [ 0 ] . length / 2 | 0 ) ;
@@ -476,7 +475,6 @@ let artMode = false;
476475let insaneMode = false ;
477476let newLoadMessage = true ;
478477const arena = createMatrix ( 12 , 20 ) ;
479- const upcoming = createMatrix ( 5 , 5 ) ;
480478// const arena = createMatrix(32, 50); // large arena
481479
482480playerReset ( ) ;
You can’t perform that action at this time.
0 commit comments