File tree Expand file tree Collapse file tree 3 files changed +6
-4
lines changed
Expand file tree Collapse file tree 3 files changed +6
-4
lines changed Original file line number Diff line number Diff line change 22< script src ="https://cdn.jsdelivr.net/npm/@supabase/supabase-js "> </ script >
33< script >
44 window . ccPorted = {
5- version : "2024-12-05T20:05:11.136Z "
5+ version : "2024-12-06T15:49:24.944Z "
66 } ;
77 const SUPABASE_URL = 'https://dahljrdecyiwfjgklnvz.supabase.co' ;
88 const SUPABASE_ANON_KEY = 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImRhaGxqcmRlY3lpd2ZqZ2tsbnZ6Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3MjgyNjE3NzMsImV4cCI6MjA0MzgzNzc3M30.8-YlXqSXsYoPTaDlHMpTdqLxfvm89-8zk2HG2MCABRI' ;
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ <h2>Controls</h2>
3232 </ div >
3333 </ div >
3434
35- < script src = "tetris.js?i=2 "> </ script >
35+ < script src = "tetris.js?i=3 "> </ script >
3636</ body >
3737
3838</ html >
Original file line number Diff line number Diff line change @@ -259,12 +259,14 @@ try {
259259 this . drop ( ) ;
260260 this . dropCounter = 0 ;
261261 }
262-
262+ this . dropInterval = Math . max ( 1000 - this . calculateLevel ( ) * 100 , 250 ) ;
263263 this . draw ( ) ;
264264 requestAnimationFrame ( this . update . bind ( this ) ) ;
265265 }
266266 }
267-
267+ calculateLevel ( ) {
268+ return Math . floor ( this . score / 500 ) ;
269+ }
268270 draw ( ) {
269271 // Clear canvas
270272 ctx . fillStyle = '#000' ;
You can’t perform that action at this time.
0 commit comments