2048.cpp icon indicating copy to clipboard operation
2048.cpp copied to clipboard

Change tile width dynamically to allow longer strings

Open BayMinimum opened this issue 5 years ago • 5 comments

image 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.

BayMinimum avatar Oct 19 '18 05:10 BayMinimum

I think this is a small bug and should be a quick fix if we work towards it!

plibither8 avatar Oct 19 '18 05:10 plibither8

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).

cawvyoct avatar Oct 19 '18 19:10 cawvyoct

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:

plibither8 avatar Oct 19 '18 19:10 plibither8

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

Scronkfinkle avatar Oct 23 '18 15:10 Scronkfinkle

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.

tcoyvwac avatar Oct 13 '19 08:10 tcoyvwac