2048.cpp
2048.cpp copied to clipboard
Change tile width dynamically to allow longer strings
Not really a priority, but this is going to happen as number grows beyond 8192 :cry:, since current implementation uses
std::setw(4)
when prining each tile.
I think this is a small bug and should be a quick fix if we work towards it!
As spotted, the game's UI is too binded with the game's logic. Currently working to separate the two. (PR:#36 was the start of this to see if it would be accepted into the codebase).
You raised a good issue. Had I started development of the game with decoupled UI-logic in mind, it would have reduced the need for large code refactoring. #36 was a great start! I have added you (@cawvyoct) as a collaborator to this repository :smile:
Although the UI and logic are locked together, we can reference the largestTile
variable and expand the table accordingly, since it is calculated before the UI updates. Implemented in #56
This Issue is currently dependent on Issue #51 (themed tiles). It could also be dependent on Issue #89 (multi-language support). Further thought is requires so this Issue is currently blocked.