Giter VIP home page Giter VIP logo

2048.cpp's Introduction

Muh

เคจเคฎเคธเฅเคคเฅ‡!

I'm Mihir, a frontend and UX developer from India ๐Ÿ‡ฎ๐Ÿ‡ณ, building web applications, microservices, etc etc.

Currently, I'm working at Flux as a Software Engineer. Previously, I've interned at Sourcegraph, Pabio (YC S21) and Devfolio.

I go by plibither8 on most networks: Twitter, LinkedIn, Hacker News, Keybase, Instagram, Last.fm, Spotify.

I am currently accepting new freelance projects. To connect with me, drop an email at [email protected] or contact me on Telegram: @plibither8.

But seriously, check out my website to know more about my work: mihir.ch.


Good times, good times.

2048.cpp's People

Contributors

amasad avatar aviskarkc10 avatar cawvyoct avatar christianbundy avatar codacy-badger avatar comwrg avatar cxong avatar farazxameer avatar flyingfisch avatar hagemt avatar informatimago avatar jcelerier avatar mathematicalist avatar patrikhuber avatar plibither8 avatar pokgak avatar scivision avatar stripedpajamas avatar tangmengqiu avatar tcoyvwac avatar tiendq avatar zestze avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

2048.cpp's Issues

Recursive strategy on menu may lead to stack overflow

Hi,

I am a total noob at C++ and I am using your project to experiment with the language. Reading the source code I came across this recursive call on Game::startGame which felt suspicious to me:

startGame(1);

I thought this recursive strategy may cause a stack overflow if abused, for example like this:

$ yes 1 | build/2048.out > /dev/null 2>&1
[1]    28385 broken pipe                       yes 1 | 
       28386 segmentation fault (core dumped)  build/2048.out > /dev/null 2>&1

I don't think this is an important issue but I'd like to know why you used this strategy instead of a loop.

Thank you for the project it has been a very helpful resource to me.

Better directory structure for project

I feel like the current structure of files and directories is inefficient and not clean. There should be better management of the source files and the build files, rather than all of them being in the root directory.

I am comparatively inexperienced with how larger C++ projects handle directory management. It would be great if a better management is suggested, and better yet, I'd welcome all PRs that implement such a structure. Thanks.

Encoding problem

When I finish the installation and open the game, the coding seems to have some problems. Can you help me? Environment: Windows 10, MinGW.

้ˆนๅฑธๆ”ข้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆน?
้ˆน?SCORE: 0 ้ˆน?
้ˆน?MOVES: 0 ้ˆน?
้ˆนๆ–บๆ”ข้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆน?

้ˆนๅฑธๆ”ข้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆน๎ƒฝๆ”ข้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆน๎ƒฝๆ”ข้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆน?
้ˆน? 2 ้ˆน? ้ˆน? ้ˆน?
้ˆนๆบพๆ”ข้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนๅฐ–ๆ”ข้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนๅฐ–ๆ”ข้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆน?
้ˆน? ้ˆน? ้ˆน? ้ˆน?
้ˆนๆบพๆ”ข้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนๅฐ–ๆ”ข้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนๅฐ–ๆ”ข้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆน?
้ˆน? ้ˆน? 2 ้ˆน? ้ˆน?
้ˆนๆ–บๆ”ข้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆน็ฒนๆ”ข้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆน็ฒนๆ”ข้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆนโ‚ฌ้ˆน?

W or K or ้ˆซ?=> Up
A or H or ้ˆซ?=> Left
S or J or ้ˆซ?=> Down
D or L or ้ˆซ?=> Right
Z or P => Save

Add option to forfeit/quit an active game session

Rather than having to ctrl+c to end the current game in progress, there could be an option to forfeit/quit the current game and return to menu.

I've noticed that there is already an CODE_HOTKEY_QUIT_ENDLESS_MODE that is somewhat similar to the proposed idea, but as far as I could tell, the endless mode is not yet implemented (is that right?).

my cmake can't run it

when I wtite
"ctest -S setup.cmake"in git bash,
it shows
" Each . represents 1024 bytes of output
. Size of output: 0K
Error(s) when configuring the project
CMake Error at D:/Gitbase/2048.cpp/setup.cmake:53 (message):
Configure failed: return -1 cmake return -1
". But my cmake is newly installed. How to solve this problem? QAQ

Character `1` being printed

I'm not sure why, but the character 1 keeps getting printed to the console for me. I'm using Zsh and GNOME Terminal. For example:

1   /\\\\\\\\\          /\\\\\\\                /\\\         /\\\\\\\\\    1
1  /\\\///////\\\      /\\\/////\\\            /\\\\\       /\\\///////\\\  1
1  \///      \//\\\    /\\\    \//\\\         /\\\/\\\      \/\\\     \/\\\  1
1             /\\\/    \/\\\     \/\\\       /\\\/\/\\\      \///\\\\\\\\\/   1
1           /\\\//      \/\\\     \/\\\     /\\\/  \/\\\       /\\\///////\\\  1
1         /\\\//         \/\\\     \/\\\   /\\\\\\\\\\\\\\\\   /\\\      \//\\\ 1
1        /\\\/            \//\\\    /\\\   \///////////\\\//   \//\\\      /\\\  1
1        /\\\\\\\\\\\\\\\   \///\\\\\\\/              \/\\\      \///\\\\\\\\\/   1
1        \///////////////      \///////                \///         \/////////     1



1  Welcome to 2048!1

          1. Play a New Game
          2. View Highscores and Statistics

  Enter Choice: 

Any ideas why this might be happening?

Add Travis CI as an automated pre-check for all Pull Requests.

Add Travis CI as an automated pre-check to help accept and merge all Pull Requests.

To prevent future incomplete and correctional merge requests, an automated Travis CI check would be very helpful.

This used to be available for pull requests in the project however this feature seems to have been lost / changed?

[Feature] Save intermediate progress feature

When I have to shut down my computer or do other jobs but I haven't finished the game, I do NOT want to give up the game, I need to save the game intermediate progress. I think it's important!

Better demo gif for README

The current demo gif on the repository's README page is alright, but it looks ugly when compared to the beautiful terminal gifs I have seen on other repositories (eg. Sindre Sorhus's repos). Anyone who can create a better gif than the current one, showcasing most of the features of the game (make sure to do a git pull), I'd be obliged. Thanks!

Multi-language support

๐Ÿ—บ๏ธ Many people around the world enjoy 2048.cpp ๐Ÿ•Š๏ธ
However, English may not be the native language of many players.

The game should have some basic multilingual support so other players around the world:

  • can enjoy the game in their native language.
  • contribute translations of English text to their native language.

score and statistics wrong

Compiled from git master 81c0eeb

  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚ SCORE:               1156 โ”‚
  โ”‚ BEST SCORE:          1156 โ”‚
  โ”‚ MOVES:                127 โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚    2 โ”‚    4 โ”‚   32 โ”‚    4 โ”‚
  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”ค
  โ”‚    4 โ”‚    8 โ”‚    4 โ”‚    2 โ”‚
  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”ค
  โ”‚    8 โ”‚    2 โ”‚  128 โ”‚    8 โ”‚
  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”ค
  โ”‚   16 โ”‚   32 โ”‚    2 โ”‚   16 โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”˜

  Game over! You lose.


  STATISTICS
  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  Final score:       0
  Largest Tile:      2
  Number of moves:   -1
  Time taken:        37s

Hmm, not really correct.

It should be:

  Final score:       1156
  Largest Tile:      128
  Number of moves:   127

And this is what shows up for View Highscores and Statistics:

  SCOREBOARD
  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚ No. โ”‚ Name               โ”‚ Score    โ”‚ Won? โ”‚ Moves โ”‚ Largest Tile โ”‚ Duration     โ”‚
  โ”œโ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ค
  โ”‚  1. โ”‚ kc                 โ”‚        0 โ”‚   No โ”‚    -1 โ”‚            2 โ”‚       9m 22s โ”‚
  โ”‚  2. โ”‚ kc                 โ”‚        0 โ”‚   No โ”‚    -1 โ”‚            2 โ”‚          37s โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜


  STATISTICS
  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚ Best Score         โ”‚           0 โ”‚
  โ”‚ Game Count         โ”‚           2 โ”‚
  โ”‚ Number of Wins     โ”‚           0 โ”‚
  โ”‚ Total Moves Played โ”‚ 18446744073709551614 โ”‚
  โ”‚ Total Duration     โ”‚      9m 59s โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

2048.cpp is not compiling

I'm trying to compile this on Fedora, but it is failing.

/tmp/ccv0qRho.o: In function `main':
2048.cpp:(.text+0x26): undefined reference to `Menu::startMenu(int)'
collect2: error: ld returned 1 exit status

Add support for 'themed' tiles

First of all, ๐Ÿ‘ for awesome project!

One cool aspect of 2048 is derivatives, such as merging elements to get element with higher atomic number. Let's add support for such themes!

New ci failure

Sorry about the CI failure on the new github actions. I know it went wrong and I'll make a new PR to fix it in the next couple days thank you.

Question: Create build script to make installation easier?

Currently, users have to follow 6 steps to install and run 2048. Though these are small and can be done quickly, it would be much more convenient if we have a bash script that does this for us.

The bash script will do the following:

  1. Clone the repository in the home folder.
  2. mkdir build, cd build to create the build directory.
  3. cmake .. and make to create the final, executable program.

These are the 3 main steps that the script will follow. After this, we should add the 2048 program to the PATH so that users can access the game from anywhere in their terminal.

Either adding to the PATH permanently or adding an alias to the game in their .bashrc or .zshrc files.

With the bash script we can also now handle OS specific actions, as adding to the PATH will be quite different in all the three major OSs.

Odd Character Display

Platform

  • Windows 10, MSVC 2017
  • Commit: 71e6237

Issue:

  • Just pulled to the latest commit on master and the game now looks like this:
    image
  • Additionally I always get the message 'clear' is not recognized as an internal or external command, operable program or batch file

when load the saved game board, best score is not visible

  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚ SCORE:                192 โ”‚
  โ”‚ MOVES:                 31 โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
 
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚      โ”‚      โ”‚      โ”‚    2 โ”‚
  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”ค
  โ”‚    2 โ”‚      โ”‚      โ”‚    8 โ”‚
  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”ค
  โ”‚      โ”‚    2 โ”‚    4 โ”‚    4 โ”‚
  โ”œโ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”ค
  โ”‚    2 โ”‚    8 โ”‚   32 โ”‚   16 โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”ดโ”€โ”€โ”€โ”€โ”€โ”€โ”˜

  W or K or โ†‘ => Up
  A or H or โ† => Left
  S or J or โ†“ => Down
  D or L or โ†’ => Right
  Z or P => Save

Is it normal to not visible the best scorer?

[Suggestion] `Time taken` can be more readable

  STATISTICS
  ----------
  Final score:       11408
  Largest Tile:      1024
  Number of moves:   692
  Time taken:        1068.8 seconds

I think Time taken change to xx Hours xx Minutes xx Seconds can be more acceptable by human beings.

Check for existence of data files before performing operations

โ–ถ ./build/2048.out

   /\\\\\\\\\          /\\\\\\\                /\\\         /\\\\\\\\\
  /\\\///////\\\      /\\\/////\\\            /\\\\\       /\\\///////\\\
  \///      \//\\\    /\\\    \//\\\         /\\\/\\\      \/\\\     \/\\\
             /\\\/    \/\\\     \/\\\       /\\\/\/\\\      \///\\\\\\\\\/
           /\\\//      \/\\\     \/\\\     /\\\/  \/\\\       /\\\///////\\\
         /\\\//         \/\\\     \/\\\   /\\\\\\\\\\\\\\\\   /\\\      \//\\\
        /\\\/            \//\\\    /\\\   \///////////\\\//   \//\\\      /\\\
        /\\\\\\\\\\\\\\\   \///\\\\\\\/              \/\\\      \///\\\\\\\\\/
        \///////////////      \///////                \///         \/////////



  Welcome to 2048!

          1. Play a New Game
          2. View Highscores and Statistics

  Enter Choice: 2

  SCOREBOARD
  ----------

  No saved scores.



  STATISTICS
  ----------

  +--------------------+------------+
  | Best Score         | 140732916466960 |
  | Game Count         |          1 |
  | Number of Wins     | -1837137648 |
  | Total Moves Played | 140734694615213 |
  | Total Duration (s) | 3.25939e-311 |
  +--------------------+------------+

error: no viable overloaded '='

Hi, we have 2048.cpp in MacPorts and it builds fine on OS X 10.11 and later, but on OS X 10.10 it fails to build. There are many errors in the log but the first is:

src/game-pregamemenu.cpp:139:42: error: no viable overloaded '='
  std::tie(loaded_gameboard, tempGBoard) =
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/tuple:500:29: note: candidate function (the implicit move assignment operator) not viable: no known conversion from 'tuple<bool, struct GameBoard>' to 'tuple<std::initializer_list<bool> &, Game::GameBoard &>' for 1st argument
class _LIBCPP_TYPE_VIS_ONLY tuple
                            ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/tuple:500:29: note: candidate function (the implicit copy assignment operator) not viable: no known conversion from 'tuple<bool, struct GameBoard>' to 'const tuple<std::initializer_list<bool> &, Game::GameBoard &>' for 1st argument
class _LIBCPP_TYPE_VIS_ONLY tuple
                            ^
/Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/tuple:692:26: note: candidate template ignored: disabled by 'enable_if' [with _Tuple = std::__1::tuple<bool, Game::GameBoard>]
                         __tuple_assignable<_Tuple, tuple>::value
                         ^

Incorrect statistics saved at the end of the game

After I finish a game, the final statistics displayed and stored do not match my final score. The final score is always stored as 0, and the largest tile is always stored as 2. Number of moves is always stored as -1. Time taken is stored correctly.

To recreate this error:
Clone the git repo, install it to a local prefix, run the game, select new game, and lose a game.

image

Loved it!

I enjoyed the game and spent a good chunk of my work time making up to 1024. ๐Ÿ˜„
Just wanted to say Kudos. :)
screen shot 2018-07-11 at 3 30 34 pm

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.