|
1 | 1 | /** |
2 | 2 | * JavaScriptris v0.3 by Anders Hagward |
3 | | - * Date: 2013-06-24 |
4 | | - * Last updated: 2013-08-16 |
| 3 | + * Created on: 2013-06-24 |
| 4 | + * Last updated: 2013-08-23 |
5 | 5 | * |
6 | | - * The challenge was: how long time will it take to write a Tetris clone |
7 | | - * stranded on a desolate island with only a laptop and an old smartphone, |
8 | | - * equipped with a painfully slow and unreliable mobile internet connection and |
9 | | - * barely basic JavaScript knowledge? The answer was: two evenings and one |
10 | | - * morning. |
11 | | - * |
12 | | - * At first I used a list containing the locked g_blocks in order to be able to |
13 | | - * render them more quickly (in contrast to looping through the 10*16 'g_blocks' |
14 | | - * matrix), but maintaining the list when deleting rows showed to be a bit |
15 | | - * tricky. I then reckoned that was a completely unnecessary optimization and |
16 | | - * saved myself from the headache. The score system is from the original Tetris |
17 | | - * but the level system is completely improvised. |
18 | | - * |
19 | | - * Enjoy this fun little project! |
| 6 | + * Stranded on a desolate island, equipped with merely a laptop, a painfully |
| 7 | + * slow and unreliable mobile internet connection and scarce JavaScript |
| 8 | + * knowledge, I started to ponder how long time it would take, and if I even |
| 9 | + * had the ability, to write a Tetris clone. Two evenings and one morning of |
| 10 | + * coding later I had found the answer. |
20 | 11 | */ |
21 | 12 |
|
22 | | -var g_version = '0.3 beta 3'; |
| 13 | +var g_version = '0.3'; |
23 | 14 |
|
24 | 15 | var g_updateInterval = 1000; |
25 | 16 |
|
26 | 17 | var g_maxlevel = 12; |
27 | 18 | var g_ghostOpacity = '0.3'; |
28 | 19 |
|
| 20 | +// Specifies how many line clears to be issued per number of lines cleared. |
| 21 | +// (To clarify: "line clears" do not equal the number of cleared lines). |
29 | 22 | var g_lineClearsPerAction = [1, 3, 5, 8]; |
30 | 23 |
|
31 | 24 | // Determines whether to show the moving tetromino or not. |
|
0 commit comments