From c48e827b490f9f88c72083d0b2946d1b9c8b1b2b Mon Sep 17 00:00:00 2001 From: jungame3757 <72293731+jungame3757@users.noreply.github.com> Date: Wed, 2 Dec 2020 18:12:48 +0900 Subject: [PATCH 1/3] fix Final Data Update when game is over, get current game board from currentgamestatus --- src/game.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/game.cpp b/src/game.cpp index 95dc3309..1cc0eca9 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -370,7 +370,7 @@ GameBoard endlessGameLoop(ull currentBestScore, competition_mode_t cm, while (loop_again) { std::tie(loop_again, currentgamestatus) = soloGameLoop(currentgamestatus); } - + gb = std::get<3>(currentgamestatus); DrawAlways(std::cout, DataSuppliment(currentgamestatus, drawEndGameLoopGraphics)); return gb; From 13f99dd0a9fc300bdf0db1b7b6dab7b0d57ff4e2 Mon Sep 17 00:00:00 2001 From: jungame3757 <72293731+jungame3757@users.noreply.github.com> Date: Sat, 5 Dec 2020 15:41:23 +0900 Subject: [PATCH 2/3] ADD ORIGINAL README FILE --- README_KOR.md | 168 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 168 insertions(+) create mode 100644 README_KOR.md diff --git a/README_KOR.md b/README_KOR.md new file mode 100644 index 00000000..60fa55cc --- /dev/null +++ b/README_KOR.md @@ -0,0 +1,168 @@ +# 2048.cpp + +[![Build Status](https://travis-ci.org/plibither8/2048.cpp.svg?branch=master)](https://travis-ci.org/plibither8/2048.cpp) +[![Build status](https://ci.appveyor.com/api/projects/status/sljhlvcx8k11ckw7?svg=true)](https://ci.appveyor.com/project/plibither8/2048-cpp) +[![Codacy Badge](https://api.codacy.com/project/badge/Grade/b37414d66e7d4146bf72a4a467fdc84d)](https://app.codacy.com/app/plibither8/2048.cpp?utm_source=github.com&utm_medium=referral&utm_content=plibither8/2048.cpp&utm_campaign=Badge_Grade_Dashboard) +[![Language grade: C/C++](https://img.shields.io/lgtm/grade/cpp/g/plibither8/2048.cpp.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/plibither8/2048.cpp/context:cpp) +[![Made with Love in India](https://madewithlove.org.in/badge.svg)](https://madewithlove.org.in/) +[![Run on Repl.it](https://repl.it/badge/github/plibither8/2048.cpp)](https://repl.it/github/plibither8/2048.cpp) + +> Terminal version of the game "2048" written in C++. + +:tada: Featured on GitHub's [Twitter](https://twitter.com/github/status/1017094930991370240) and [Facebook](https://www.facebook.com/GitHub/videos/1433491453419807/) pages! :tada: + +

+ 2048 in action! +

+ +## Setup + +The game and code is made to run natively on the GNU/Linux and MacOS platforms, but cross-platform compatibility for Windows has been added too. + +### Requirements + +* C++11 compiler (e.g. `g++`, `clang++`, `pgc++`, `icpc`, etc.) +* Virtually any platform including: + * Linux + * MacOS + * Windows (via Cygwin or Windows Subsystem for Linux) +* [CMake](https://cmake.org/) or [Meson](https://mesonbuild.com/) + +### Installation + +1. Open your terminal in your preferred directory and clone this project: +```sh +git clone https://github.com/plibither8/2048.cpp +``` +2. Enter the project's build directory: +```sh +cd 2048.cpp/build +``` + +--- + +For both CMake and Meson, the default C++ compiler on your system will be used. +If you wish to manually select a C++ compiler, optionally add `CXX=clang++ cmake` or `CXX=clang++ meson` etc. + +#### Building with CMake + +3. Generate build configuration +```sh +cmake ../ +``` +4. Build the executable +```sh +cmake --build . +``` +5. Install the program (optional) +```sh +cmake --build . --target install +``` + +6. Run the program and play the game! :tada: +```sh +2048 # run `./2048` if game is not installed +``` + +

+ OR +

+ +#### Building with Meson + +3. Generate build configuration +```sh +meson ../ +``` +4. Build the executable +```sh +ninja +``` +5. Install the program (optional) +```sh +meson configure --prefix=$HOME/.local +ninja install +``` + +6. Run the program and play the game! :tada: +```sh +2048 # run `./2048` if game is not installed +``` + +## Contributing + +First of all, thank you for contributing :smile:! A few things to note: + +* If you have found a bug, or have a feature that you'd like implemented, [raise an issue](https://github.com/plibither8/2048.cpp/issues). + +* If you have proposed a pull request, make sure that you run `clang-format` on the source code (both, `.cpp` and `.hpp`) files if you've made changes there. + +* In your local repository, run `git update-index --skip-worktree ./data/*.txt` to ensure that changes to the data files are not tracked by git, and thus are not staged. + +## Thanks + +I deeply appreciate the help of the following people: + +* [Michael Hirsch](https://github.com/scivision) + * cleaned up the code, + * organised the header files in a better way for a more efficient build, + * added the AppVeyor CI, + * added the Meson build system and, fixed CMake and added install feature. +* [Aiman Ismail](https://github.com/pokgak) added support for Vim keybinding. +* [Patrik Huber](https://github.com/patrikhuber) fixed a typo in the Readme. +* [zestze](https://github.com/zestze) changed `cstdlib rand` to C++ random int generator. +* [Pascal J. Bourguignon](https://github.com/informatimago) added support for ANSI arrow keys. +* [Jean-Michaël Celerier](https://github.com/jcelerier) added `CMakeLists.txt` file. +* [comwrg](https://github.com/comwrg) made the duration in the statistics and highscores human-readable, wrapping seconds to minutes and hours. +* [Christian Bundy](https://github.com/christianbundy) replaced the ugly -, + and | with box-drawing characters. +* [Tor E Hagemann](https://github.com/hagemt) fixed issue #10, causing unwanted character `1` to be printed. +* [farazxameer](https://github.com/farazxameer) implemented feature to save a game state and continue from a saved game state, refined game logic. +* [drodil](https://github.com/drodil) implemented checks to ascertain existence of data files, fixed issue #12 +* [Aviskar KC](https://github.com/aviskarkc10) added arrow keys to game instructions. +* [Peter Squicciarini](https://github.com/stripedpajamas) fixed readme instructions. +* [Mark Fischer, Jr.](https://github.com/flyingfisch) fixed a typo. +* [Hugo Brandão](https://github.com/jhugobb) completely reorganised the existing project structure and updated the build method to enfore CMake. +* [Alton Alvarez](https://github.com/mathematicalist) fixed a typo. +* [cawvyoct](https://github.com/cawvyoct) made the source code much, much easier to read: removed most magic numbers, replacing them with variables to ease maintenance. Implemented `clang-format`. +* [Cong](https://github.com/cxong) edited the `Game` class constructor. +* [Tien Do](https://github.com/tiendq) added the 'exit' option in the main menu, updated the `CMakeLists.txt` file and made `Color` enum to a scoped enum. +* [ScorrMorr](https://github.com/ScorrMorr) made many methods `const`s. +* [tangmengqiu](https://github.com/tangmengqiu) fixed an error-causing instruction step in the readme. + +### Maintainers + +* [Mihir Chaturvedi](https://github.com/plibither8) +* [cawvyoct](https://github.com/cawvyoct) + +## Notes + +`[GameBoard].getTile(2,0)` refers to the 0th tile (or column) in 2nd row as in this case, x = 0 and y = 2. The specific tile is denoted the by '@' symbol in the following gameboard: + +> Note: `row` and `column` indexing starts at 0. + +```plaintext +┌──────┬──────┬──────┬──────┐ +│ │ │ │ │ +├──────┼──────┼──────┼──────┤ +│ │ │ │ │ +├──────┼──────┼──────┼──────┤ +│ @ │ │ │ │ +├──────┼──────┼──────┼──────┤ +│ │ │ │ │ +└──────┴──────┴──────┴──────┘ +``` + +## To-Do + +- [x] Add start menu [19/04/2018] +- [x] Save highscore / score [21/04/2018] +- [x] Save a game state and play from a saved game state +- [ ] ~~AI~~ *(Abandoned indefinitely)* + +--- + +## License + +Copyright (c) Mihir Chaturvedi. All rights reserved. + +Licensed under the [MIT](LICENSE) License. From 7e60125445327f150d36bd366a8240b610ce2e5a Mon Sep 17 00:00:00 2001 From: jungame3757 <72293731+jungame3757@users.noreply.github.com> Date: Sat, 5 Dec 2020 16:03:45 +0900 Subject: [PATCH 3/3] Update README_KOR.md update translate --- README_KOR.md | 72 +++++++++++++++++++++++++-------------------------- 1 file changed, 36 insertions(+), 36 deletions(-) diff --git a/README_KOR.md b/README_KOR.md index 60fa55cc..ceb076c8 100644 --- a/README_KOR.md +++ b/README_KOR.md @@ -7,59 +7,59 @@ [![Made with Love in India](https://madewithlove.org.in/badge.svg)](https://madewithlove.org.in/) [![Run on Repl.it](https://repl.it/badge/github/plibither8/2048.cpp)](https://repl.it/github/plibither8/2048.cpp) -> Terminal version of the game "2048" written in C++. +> C++ 로 쓰여진 2048 게임의 최종 버전입니다. -:tada: Featured on GitHub's [Twitter](https://twitter.com/github/status/1017094930991370240) and [Facebook](https://www.facebook.com/GitHub/videos/1433491453419807/) pages! :tada: +:tada: GitHub의 [Twitter](https://twitter.com/github/status/1017094930991370240) 와 [Facebook](https://www.facebook.com/GitHub/videos/1433491453419807/) 페이지에 소개되어 있습니다! :tada:

2048 in action!

-## Setup +## 호환성 -The game and code is made to run natively on the GNU/Linux and MacOS platforms, but cross-platform compatibility for Windows has been added too. +게임과 코드는 GNU/리눅스 및 MacOS 플랫폼에서 기본적으로 실행되도록 만들어졌지만, 윈도우를 위한 크로스 플랫폼 호환성도 추가했습니다. -### Requirements +### 요구사항 -* C++11 compiler (e.g. `g++`, `clang++`, `pgc++`, `icpc`, etc.) +* C++11 컴파일러 (e.g. `g++`, `clang++`, `pgc++`, `icpc`, etc.) * Virtually any platform including: * Linux * MacOS * Windows (via Cygwin or Windows Subsystem for Linux) * [CMake](https://cmake.org/) or [Meson](https://mesonbuild.com/) -### Installation +### 설치방법 -1. Open your terminal in your preferred directory and clone this project: +1. 원하는 디렉토리에서 터미널을 열고 이 프로젝트를 복제하십시오: ```sh git clone https://github.com/plibither8/2048.cpp ``` -2. Enter the project's build directory: +2. 프로젝트의 빌드 디렉토리를 입력하십시오: ```sh cd 2048.cpp/build ``` --- -For both CMake and Meson, the default C++ compiler on your system will be used. -If you wish to manually select a C++ compiler, optionally add `CXX=clang++ cmake` or `CXX=clang++ meson` etc. +CMake와 Meson 모두에 대해, 시스템의 기본 C++ 컴파일러가 사용됩니다. +C++ 컴파일러를 수동으로 선택하려면 CXX=clang++ cmake 또는 CXX=clang++ meson 등을 선택적으로 추가하십시오. -#### Building with CMake +#### CMake로 빌드하기 -3. Generate build configuration +3. 빌드 구성을 생성하십시오. ```sh cmake ../ ``` -4. Build the executable +4. 실행 파일을 빌드하십시오. ```sh cmake --build . ``` -5. Install the program (optional) +5. 프로그램을 설치하십시오. (옵션) ```sh cmake --build . --target install ``` -6. Run the program and play the game! :tada: +6. 프로그램을 실행해서 게임을 하십시오! :tada: ```sh 2048 # run `./2048` if game is not installed ``` @@ -68,9 +68,9 @@ cmake --build . --target install OR

-#### Building with Meson +#### Meson으로 빌드하기 -3. Generate build configuration +3. 빌드 구성을 생성하십시오. ```sh meson ../ ``` @@ -78,30 +78,30 @@ meson ../ ```sh ninja ``` -5. Install the program (optional) +5. 프로그램을 설치하십시오. (옵션) ```sh meson configure --prefix=$HOME/.local ninja install ``` -6. Run the program and play the game! :tada: +6. 프로그램을 실행해서 게임을 하십시오! :tada: ```sh 2048 # run `./2048` if game is not installed ``` -## Contributing +## 기여활동 -First of all, thank you for contributing :smile:! A few things to note: +먼저, 여러분들의 기여에 감사드립니다! 몇가지 공지할 것이 있습니다: -* If you have found a bug, or have a feature that you'd like implemented, [raise an issue](https://github.com/plibither8/2048.cpp/issues). +* 버그를 발견했거나 구현하고 싶은 기능이 있는 경우 문제를 제기하십시오, [raise an issue](https://github.com/plibither8/2048.cpp/issues). -* If you have proposed a pull request, make sure that you run `clang-format` on the source code (both, `.cpp` and `.hpp`) files if you've made changes there. +* pull 요청을 제안한 경우, 원본 코드(.cpp 및 .hpp) 파일에서 `clang 형식`을 실행하십시오. -* In your local repository, run `git update-index --skip-worktree ./data/*.txt` to ensure that changes to the data files are not tracked by git, and thus are not staged. +* 로컬 저장소(리포지토리)에서 `git update-index --skip-worktree ./data/*.txt`를 실행하여 데이터 파일의 변경 내용이 git에 의해 추적되지 않도록 하십시오. -## Thanks +## 감사 -I deeply appreciate the help of the following people: +다음과 같은 사람들의 도움에 깊이 감사드립니다: * [Michael Hirsch](https://github.com/scivision) * cleaned up the code, @@ -129,16 +129,16 @@ I deeply appreciate the help of the following people: * [ScorrMorr](https://github.com/ScorrMorr) made many methods `const`s. * [tangmengqiu](https://github.com/tangmengqiu) fixed an error-causing instruction step in the readme. -### Maintainers +### 관리자 * [Mihir Chaturvedi](https://github.com/plibither8) * [cawvyoct](https://github.com/cawvyoct) -## Notes +## 참고 -`[GameBoard].getTile(2,0)` refers to the 0th tile (or column) in 2nd row as in this case, x = 0 and y = 2. The specific tile is denoted the by '@' symbol in the following gameboard: +`[GameBoard].getTile(2,0)` 는 x = 0, y = 2 처럼 2행의 0번째 타일(또는 열)을 가리킨다. 다음 게임보드에서 특정 타일은 '@' 기호로 표시됩니다: -> Note: `row` and `column` indexing starts at 0. +> 참고: 행 및 열 인덱싱은 0부터 시작합니다. ```plaintext ┌──────┬──────┬──────┬──────┐ @@ -152,16 +152,16 @@ I deeply appreciate the help of the following people: └──────┴──────┴──────┴──────┘ ``` -## To-Do +## 개발예정 -- [x] Add start menu [19/04/2018] -- [x] Save highscore / score [21/04/2018] -- [x] Save a game state and play from a saved game state +- [x] 시작 메뉴 추가 [19/04/2018] +- [x] 고득점/점수 저장 [21/04/2018] +- [x] 게임 상태를 저장하고 저장된 게임 상태에서 재생 - [ ] ~~AI~~ *(Abandoned indefinitely)* --- -## License +## 라이선스 Copyright (c) Mihir Chaturvedi. All rights reserved.