diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 0d31019855..0000000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -.sass-cache/ diff --git a/.jshintrc b/.jshintrc deleted file mode 100644 index 87dbf9ac3d..0000000000 --- a/.jshintrc +++ /dev/null @@ -1,19 +0,0 @@ -{ - "esnext": true, - "indent": 2, - "maxlen": 80, - "freeze": true, - "camelcase": true, - "unused": true, - "eqnull": true, - "proto": true, - "supernew": true, - "noyield": true, - "evil": true, - "node": true, - "boss": true, - "expr": true, - "loopfunc": true, - "white": true, - "maxdepth": 4 -} diff --git a/LICENSE.txt b/LICENSE similarity index 100% rename from LICENSE.txt rename to LICENSE diff --git a/README.md b/README.md index 6b1da38794..44efcb4deb 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,8 @@ -# 2048 -A small clone of [1024](https://play.google.com/store/apps/details?id=com.veewo.a1024), based on [Saming's 2048](http://saming.fr/p/2048/) (also a clone). +# 2048汉化版 +这是2048的汉化版,源代码来自github上面的另一位大佬https://github.com/gabrielecirulli/2048 +可惜的是只有英文,自己也没有找到比较好的中文版的2048,便自己翻译成了中文,现在看应该翻译的差不多了,如果还有没有翻译完成的地方请随时告诉我,继续去完善这个翻译。 +## demo网址 +https://game.377.run +## 赞赏我 +![](https://raw.githubusercontent.com/xiaocao666tzh/imghosting/main/img/%E4%B8%87%E8%83%BD%E6%94%B6%E6%AC%BE%E7%A0%81-%E8%8D%89%E3%81%AE%E5%8D%9A%E5%AE%A2.png) -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 - - [marcingajda](https://github.com/marcingajda) made swipes work on Windows Phone - - [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. - -### Screenshot - -
- -
- -That screenshot is fake, by the way. I never reached 2048 :smile: - -## Contributing -Changes and improvements are more than welcome! Feel free to fork and open a pull request. Please make your changes in a specific branch and request to pull into `master`! If you can, please make sure the game fully works before sending the PR, as that will help speed up the process. - -You can find the same information in the [contributing guide.](https://github.com/gabrielecirulli/2048/blob/master/CONTRIBUTING.md) - -## License -2048 is licensed under the [MIT license.](https://github.com/gabrielecirulli/2048/blob/master/LICENSE.txt) - -## Donations -I made this in my spare time, and it's hosted on GitHub (which means I don't have any hosting costs), but if you enjoyed the game and feel like buying me coffee, you can donate at my BTC address: `1Ec6onfsQmoP9kkL3zkpB6c5sA4PVcXU2i`. Thank you very much! diff --git a/index.html b/index.html index 0da0ee0e1b..cada390e38 100644 --- a/index.html +++ b/index.html @@ -27,16 +27,16 @@- How to play: Use your arrow keys to move the tiles. When two tiles with the same number touch, they merge into one! + 怎么玩: 用你的 上下左右键 去移动数字. 当两个相同的数字碰到一起时, 它们 就会合二为一
- Note: This site is the official version of 2048. You can play it on your phone via http://git.io/2048. All other apps or sites are derivatives or fakes, and should be used with caution. + PS: 本站为2048正式版。源代码来自 github
- Created by Gabriele Cirulli. Based on 1024 by Veewo Studio and conceptually similar to Threes by Asher Vollmer. + 由 Gabriele Cirulli. 创作,基于 Veewo Studio的1024 与Threes by Asher Vollmer概念相似,由小草汉化
diff --git a/js/html_actuator.js b/js/html_actuator.js index 6b31f2d107..68cf4c4291 100644 --- a/js/html_actuator.js +++ b/js/html_actuator.js @@ -126,7 +126,7 @@ HTMLActuator.prototype.updateBestScore = function (bestScore) { HTMLActuator.prototype.message = function (won) { var type = won ? "game-won" : "game-over"; - var message = won ? "You win!" : "Game over!"; + var message = won ? "恭喜你赢了!" : "游戏失败!"; this.messageContainer.classList.add(type); this.messageContainer.getElementsByTagName("p")[0].textContent = message; diff --git a/style/main.css b/style/main.css index ea3cb19fca..c65d0a7002 100644 --- a/style/main.css +++ b/style/main.css @@ -90,10 +90,10 @@ h1.title { animation-fill-mode: both; } .score-container:after { - content: "Score"; } + content: "分数"; } .best-container:after { - content: "Best"; } + content: "最高分"; } p { margin-top: 0; diff --git a/style/main.scss b/style/main.scss index b0ec8da9cc..e5cadb1a50 100644 --- a/style/main.scss +++ b/style/main.scss @@ -107,11 +107,11 @@ h1.title { } .score-container:after { - content: "Score"; + content: "分数"; } .best-container:after { - content: "Best"; + content: "最高分"; } p {