diff --git a/apps/game1024/Changelog b/apps/game1024/Changelog index 310242d11..b45a8d3ad 100644 --- a/apps/game1024/Changelog +++ b/apps/game1024/Changelog @@ -1,2 +1,2 @@ 0.01: New App! -0.5: First version in Github \ No newline at end of file +0.02: Temporary intermediate version \ No newline at end of file diff --git a/apps/game1024/README.md b/apps/game1024/README.md new file mode 100644 index 000000000..d1d427078 --- /dev/null +++ b/apps/game1024/README.md @@ -0,0 +1,28 @@ + +# Play the game of 1024 + +Move the tiles by swiping to the lefthand, righthand or up- and downward side of the watch. + +When two tiles with the same number are squashed together they will add up as exponentials: + +**1 + 1 = 2** or **A + A = D** which is a representation of **2¹ + 2¹ = 2² = 4** + +**2 + 2 = 3** or **B + B = C** which is a representation of **2² + 2² = 2³ = 8** + +**3 + 3 = 4** or **C + C = D** which is a representation of **2³ + 2³ = 2⁴ = 16** + +So you can continue till you reach **1024** which equals **2¹⁰**. So when you reach tile **10** you have won. + +The score is maintained by adding the outcome of the sum of all pairs of squashed tiles (4+16+4+8 etc.) + +## Buttons + + - Button **U**: Undo the last move. There are currently a maximum of 4 undo levels + - Button **\***: Change the text on the tile to number, capitals or Roman numbers + - Button **R**: Reset the game. The Higscore will be remembered. You will be prompted first. + +### Credits + +Game 1024 is based on Saming's 2048 and Misho M. Petković 1024game.org and conceptually similar to Threes by Asher Vollmer. + +![Screenshot from the Banglejs 2 watch with the game](./game1024_sc_watch.png) \ No newline at end of file diff --git a/apps/game1024/app.js b/apps/game1024/app.js index 52f82cdeb..352426d57 100644 --- a/apps/game1024/app.js +++ b/apps/game1024/app.js @@ -436,9 +436,9 @@ function initGame() { if (snReadOnInit) { snapshot.recover(); debug(console.log("R E C O V E R E D !", snapshot.dump)); - let sum = allSquares.reduce((t,v) => { return t + v ;}); + let sum = allSquares.reduce(function (tv, sq) {return (sq.expVal + tv) ;}, 0); if (!sum) { - addRandomNumber(); + addRandomNumber(); } } else { addRandomNumber(); @@ -679,4 +679,4 @@ buttons.add(new Button('restart', btnAtribs.x, 106, btnAtribs.w, btnAtribs.h, 'R initGame(); -dragger.setEnabled(true); +dragger.setEnabled(true); \ No newline at end of file diff --git a/apps/game1024/game1024_sc_watch.png b/apps/game1024/game1024_sc_watch.png new file mode 100644 index 000000000..ca8184b0b Binary files /dev/null and b/apps/game1024/game1024_sc_watch.png differ diff --git a/apps/game1024/metadata.json b/apps/game1024/metadata.json index 83a3613f2..5b75212bc 100644 --- a/apps/game1024/metadata.json +++ b/apps/game1024/metadata.json @@ -1,10 +1,11 @@ { "id": "game1024", "name": "1024 Game", "shortName" : "1024 Game", - "version": "0.5", + "version": "0.02", "icon": "game1024.png", "screenshots": [ {"url":"screenshot.png" } ], - "description": "Join the numbers and get to the 1024(2^10) or J or X tile!", + "readme":"README.md", + "description": "Join the numbers and get to the 1024, J or X tile!", "type": "app", "tags": "game,puzzle", "allow_emulator": true,