Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A Chinese version #524

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .gitignore

This file was deleted.

19 changes: 0 additions & 19 deletions .jshintrc

This file was deleted.

File renamed without changes.
44 changes: 7 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

<p align="center">
<img src="https://cloud.githubusercontent.com/assets/1175750/8614312/280e5dc2-26f1-11e5-9f1f-5891c3ca8b26.png" alt="Screenshot"/>
</p>

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!
14 changes: 7 additions & 7 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,16 @@ <h1 class="title">2048</h1>
</div>

<div class="above-game">
<p class="game-intro">Join the numbers and get to the <strong>2048 tile!</strong></p>
<a class="restart-button">New Game</a>
<p class="game-intro">玩这个游戏并且 <strong>合成2048!</strong></p>
<a class="restart-button">新游戏</a>
</div>

<div class="game-container">
<div class="game-message">
<p></p>
<div class="lower">
<a class="keep-playing-button">Keep going</a>
<a class="retry-button">Try again</a>
<a class="keep-playing-button">加油!</a>
<a class="retry-button">再来亿次</a>
</div>
</div>

Expand Down Expand Up @@ -73,15 +73,15 @@ <h1 class="title">2048</h1>
</div>

<p class="game-explanation">
<strong class="important">How to play:</strong> Use your <strong>arrow keys</strong> to move the tiles. When two tiles with the same number touch, they <strong>merge into one!</strong>
<strong class="important">怎么玩:</strong> 用你的 <strong>上下左右键</strong> 去移动数字. 当两个相同的数字碰到一起时, 它们 <strong>就会合二为一</strong>
</p>
<hr>
<p>
<strong class="important">Note:</strong> This site is the official version of 2048. You can play it on your phone via <a href="http://git.io/2048">http://git.io/2048.</a> All other apps or sites are derivatives or fakes, and should be used with caution.
<strong class="important">PS:</strong> 本站为2048正式版。源代码来自 <a href="https://github.com/gabrielecirulli/2048" target="_blank">github</a>
</p>
<hr>
<p>
Created by <a href="http://gabrielecirulli.com" target="_blank">Gabriele Cirulli.</a> Based on <a href="https://itunes.apple.com/us/app/1024!/id823499224" target="_blank">1024 by Veewo Studio</a> and conceptually similar to <a href="http://asherv.com/threes/" target="_blank">Threes by Asher Vollmer.</a>
<a href="http://gabrielecirulli.com" target="_blank">Gabriele Cirulli.</a> 创作,基于 <a href="https://itunes.apple.com/us/app/1024!/id823499224" target="_blank"> Veewo Studio的1024</a> <a href="http://asherv.com/threes/" target="_blank">Threes by Asher Vollmer</a>概念相似,由<a href="https://377.run" target="_blank">小草</a>汉化
</p>
</div>

Expand Down
2 changes: 1 addition & 1 deletion js/html_actuator.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions style/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions style/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ h1.title {
}

.score-container:after {
content: "Score";
content: "分数";
}

.best-container:after {
content: "Best";
content: "最高分";
}

p {
Expand Down