-
Notifications
You must be signed in to change notification settings - Fork 321
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #114 from tcoyvwac/fix/extract_graphics_code_from_…
…logic_code Fix: Separate / Divide code handling graphics from code handling logic --- Contributions to the project are welcomed. New contributors vary in Issues and Pull Requests. However, logical Issues and PRs (to do with game flow and running of the game) are different from stylistic Issues and PRs (to do with spacing in 2048 game board's grid, language text-labels presentation, e.t.c.). Currently, for newcomers and reviewers, it can be slow to understand the project's code because "graphics" code is too interlinked with code dealing with logic. This PR is to help fix this. Key points: * "Graphical functions" in the project have been moved to translation units with "*-graphics" at the end of its name as much as possible. * Graphical functions' dependency on the global variable `std::cout` has been reduced as much as possible. * A new DataSuppliment function has been added to pass data required for some graphical functions to work. * Comments on the standard "layering of elements" in a typical 2048 game session has been added. * Basic design of a "separation of concerns" of event-triggers / flags has been added. Will be more robust in a future PR.
- Loading branch information
Showing
27 changed files
with
824 additions
and
478 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.