Skip to content

18-2-SKKU-OSS/2018-2-OSS-E6-new

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

48 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2048.cpp

Build Status Build status Codacy Badge Language grade: C/C++ Made with Love in India

Terminal version of the game "2048" written in C++.

🎉 Featured on GitHub's Twitter and Facebook pages! 🎉

2048 in action!

2018-2-OSS-E6 TEAM MEMBERS

윤혜진 / 2017311666 / yhjsoar / [email protected]
Roll : 조장, github page 생성, menu.cpp 한글화 및 한글 메뉴 생성, 게임 종료 후 뒤로가기 구현, 한글 스코어 오류 수정
이지환 / 2014312411 / hwan3526 / [email protected]
Roll : 스코어보드, 스코어보드 진입시 사이즈 입력, 게임 시작시 사이즈 입력 부분에서 메뉴로 돌아갈 수 있도록 코드 수정, game.cpp 한글화
윤재한 / 2017314561 / yjh1534 / [email protected]
Roll : scores, statistics모든 사이즈 저장 관련 코드 수정, 메뉴얼.md 한글판 작성, scores.cpp 한글화, ReadMe.md 수정
이인수 / 2017314655 / Leeinsu1 / [email protected]
Roll : 이슈관리, 게임에러확인, 코드수정, cmake 메뉴얼작성, 발표준비
함수민 / 2017314317 / sumin8861 / [email protected]
Roll : 이슈관리, 게임에러확인, 코드분석, 발표, 발표준비

github page

https://18-2-skku-oss.github.io/2018-2-OSS-E6-new/

pull request

from our 2048 repo

to original 2048 repo

branch: KoreanGame(번역판), ScoresPullRequest(통계, 뒤로가기)

코드 수정 사항

  • 한글판 게임 제작
  • 뒤로가기 구현
  • 게임 중 메뉴로 돌아가는 기능 구현
  • 한글 기록 관련 표 밀림 현상 수정
  • 보다 자세한 사항은 github page의 Home-<프로젝트 소개>를 참고

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++ compiler (e.g. g++, clang++, etc.)
  • Linux, macOS OR Windows with a working terminal (Cygwin, Windows Subsystem for Linux or Git bash is recommended for Windows)
  • CMake

Installation

  1. Open your terminal in your preferred directory and clone this project:
$ git clone https://github.com/plibither8/2048.cpp
  1. Enter the project directory:
$ cd 2048.cpp
  1. Create and enter the build directory:
$ mkdir build && cd build
  1. Compile the program with cmake
$ cmake ..
  1. Build the executable
$ make
  1. Run the program and play the game! 🎉
$ ./2048

Contributing

First of all, thank you for contributing 😄! A few things to note:

  • If you have found a bug, or have a feature that you'd like implemeted, raise an issue.

  • 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 cleaned up the code, organised the header files in a better way for a more efficient build and added the AppVeyor CI.
  • Aiman Ismail added support for Vim keybinding.
  • Patrik Huber fixed a typo in the Readme.
  • zestze changed cstdlib rand to C++ random int generator.
  • Pascal J. Bourguignon added support for ANSI arrow keys.
  • Jean-Michaël Celerier added CMakeLists.txt file.
  • comwrg made the duration in the statistics and highscores human-readable, wrapping seconds to minutes and hours.
  • Christian Bundy changed the ugly -, + and | to box-drawing characters.
  • Tor E Hagemann fixed issue #10, causing unwanted character 1 to be printed.
  • farazxameer implemented feature to save a game state and continue from a saved game state, refined game logic.
  • drodil implemented checks to ascertain existance of data files, fixed issue #12
  • Aviskar KC added arrow keys to game instructions.
  • Peter Squicciarini fixed readme instructions.
  • Mark Fischer, Jr. fixed a typo.
  • Hugo Brandão completely reorganised the existing project structure and updated the build method to enfore CMake.
  • Alton Alvarez fixed a typo.
  • cawvyoct made the source code much, much easier to read: removed most magic numbers, replacing them with variables to ease maintanence. Implemented clang-format.
  • Cong edited the Game class constructor.
  • Tien Do added the 'exit' option in the main menu, updated the CMakeLists.txt file and made Color enum to a scoped enum.
  • ScorrMorr made many methods consts.

Maintainers

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.

┌──────┬──────┬──────┬──────┐
│      │      │      │      │
├──────┼──────┼──────┼──────┤
│      │      │      │      │
├──────┼──────┼──────┼──────┤
│   @  │      │      │      │
├──────┼──────┼──────┼──────┤
│      │      │      │      │
└──────┴──────┴──────┴──────┘

To-Do

  • Add start menu [19/04/2018]
  • Save highscore / score [21/04/2018]
  • 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.