diff --git a/README.md b/README.md index dac8af33f569331015a3d356eeb070818825c94b..1c4f46d6f5ced86f767a27ea54b702c1384e56f8 100644 --- a/README.md +++ b/README.md @@ -3,12 +3,18 @@ A small clone of [1024](https://play.google.com/store/apps/details?id=com.veewo. Made just for fun. [Play it here!](http://gabrielecirulli.github.io/2048/) +The official app can also be found on the [Play Store](https://play.google.com/store/apps/details?id=com.gabrielecirulli.app2048) and [App Store!](https://itunes.apple.com/us/app/2048-by-gabriele-cirulli/id868076805) + ### Contributions +[Anna Harren](https://github.com/iirelu/) and [sigod](https://github.com/sigod) are maintainers for this repository. + +Other notable contributors: + - [TimPetricola](https://github.com/TimPetricola) added best score storage - [chrisprice](https://github.com/chrisprice) added custom code for swipe handling on mobile - [elektryk](https://github.com/elektryk) made swipes work on Windows Phone - - [mgarciaisaia](https://github.com/mgarciaisaia) addes support for Android 2.3 + - [mgarciaisaia](https://github.com/mgarciaisaia) added support for Android 2.3 Many thanks to [rayhaanj](https://github.com/rayhaanj), [Mechazawa](https://github.com/Mechazawa), [grant](https://github.com/grant), [remram44](https://github.com/remram44) and [ghoullier](https://github.com/ghoullier) for the many other good contributions. diff --git a/index.html b/index.html index a6179405f6c0c64fdb301e4887d7c88dd8932e98..70da44186ecc1c02528636bd6e0ad55099e22543 100644 --- a/index.html +++ b/index.html @@ -7,6 +7,8 @@ + + diff --git a/js/animframe_polyfill.js b/js/animframe_polyfill.js index c45a13e204478ffd468beebcb10bb143a283b34b..c524a994a92103b6b5dc51af82ca8041884b6eea 100644 --- a/js/animframe_polyfill.js +++ b/js/animframe_polyfill.js @@ -1,17 +1,19 @@ -(function() { +(function () { var lastTime = 0; var vendors = ['webkit', 'moz']; - for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { - window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame']; - window.cancelAnimationFrame = - window[vendors[x]+'CancelAnimationFrame'] || window[vendors[x]+'CancelRequestAnimationFrame']; + for (var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { + window.requestAnimationFrame = window[vendors[x] + 'RequestAnimationFrame']; + window.cancelAnimationFrame = window[vendors[x] + 'CancelAnimationFrame'] || + window[vendors[x] + 'CancelRequestAnimationFrame']; } if (!window.requestAnimationFrame) { - window.requestAnimationFrame = function(callback, element) { + window.requestAnimationFrame = function (callback) { var currTime = new Date().getTime(); var timeToCall = Math.max(0, 16 - (currTime - lastTime)); - var id = window.setTimeout(function() { callback(currTime + timeToCall); }, + var id = window.setTimeout(function () { + callback(currTime + timeToCall); + }, timeToCall); lastTime = currTime + timeToCall; return id; @@ -19,7 +21,7 @@ } if (!window.cancelAnimationFrame) { - window.cancelAnimationFrame = function(id) { + window.cancelAnimationFrame = function (id) { clearTimeout(id); }; } diff --git a/js/game_manager.js b/js/game_manager.js index aea99f335af91940991c9286147d1c1c1e171084..1c13d15bd667afe06f95316942324885c45d8e6d 100644 --- a/js/game_manager.js +++ b/js/game_manager.js @@ -28,11 +28,7 @@ GameManager.prototype.keepPlaying = function () { // Return true if the game is lost, or has won and the user hasn't kept playing GameManager.prototype.isGameTerminated = function () { - if (this.over || (this.won && !this.keepPlaying)) { - return true; - } else { - return false; - } + return this.over || (this.won && !this.keepPlaying); }; // Set up the game diff --git a/meta/apple-touch-startup-image-640x1096.png b/meta/apple-touch-startup-image-640x1096.png new file mode 100644 index 0000000000000000000000000000000000000000..5a68ba0bcbae90bfe65e5fd936fd391f5f37a1b2 Binary files /dev/null and b/meta/apple-touch-startup-image-640x1096.png differ diff --git a/meta/apple-touch-startup-image-640x920.png b/meta/apple-touch-startup-image-640x920.png new file mode 100644 index 0000000000000000000000000000000000000000..17bc9d8322bd3787aee5020f61a4844aae7ca11a Binary files /dev/null and b/meta/apple-touch-startup-image-640x920.png differ diff --git a/style/main.css b/style/main.css index 7f24f26a422eaaa9ea85e5dc3029cc73b48826d8..e9c4f38bdc3e005e5452bfe1babafb098a7d1ac1 100644 --- a/style/main.css +++ b/style/main.css @@ -310,7 +310,7 @@ hr { .tile, .tile .tile-inner { width: 107px; height: 107px; - line-height: 116.25px; } + line-height: 107px; } .tile.tile-position-1-1 { -webkit-transform: translate(0px, 0px); -moz-transform: translate(0px, 0px); @@ -749,7 +749,7 @@ hr { .tile, .tile .tile-inner { width: 58px; height: 58px; - line-height: 67.5px; } + line-height: 58px; } .tile.tile-position-1-1 { -webkit-transform: translate(0px, 0px); -moz-transform: translate(0px, 0px); diff --git a/style/main.scss b/style/main.scss index c060442278f1233344dfa4e4dff635deaf2a5168..50fffa466d6c56f11605fc12c31dcc3fe41dd9b1 100644 --- a/style/main.scss +++ b/style/main.scss @@ -374,7 +374,7 @@ hr { &, .tile-inner { width: ceil($tile-size); height: ceil($tile-size); - line-height: $tile-size + 10px; + line-height: ceil($tile-size); } // Build position classes