$25
Introduction
The purpose of this assignment is to design and specify modules for playing the game 2048. An on-line version of 2048 can be found at:
https://play2048.co/
The modules you are required to specify and implement are the Model and View portions of the Model View Controller design pattern. You do not need to write a controller. Your unit tests will take the role of controller. Bonus marks are available if you choose to specify and implement the entire game, including the Controller, or alternatively combining the Controller with the View for a Model View design pattern.
Your assignment is for the module that stores the state of the game board and the status of the game. You also need a module that can display (view) the state of the game board using text based (ASCII) graphics. Alternatively, for a Bonus grade, you can provide a GUI view of the game board, if you prefer. In addition to the model and view modules, you may also include other modules in your design, as necessary..
Your specification can assume that you have access to a function random that returns a random number between 0 and 1.
Part 1
Step 1
your design specification, written in LATEX, of the MIS for the game state module and view module. If your specification requires additional modules, you should include their MISes as well. It is up to you to determine your modules interface; that is, you decide on the exported constants, access programs, exceptions etc. You also determine your state variables and specify the semantics for your access program calls. Your design does not need to concern itself with performance. Your specification should be clear, unambiguous, understandable, consistent, complete, validatable and abstract.
At the beginning of your specification document, list the likely changes that you design considers. At this point also give an informal overview of your design. If it is helpful, you can include a diagram of your design, either as a uses relation, or a UML class diagram.
At the end of your specification document you should include an overview/critique of your own design. Please be specific. In particular, you should self-assess how your design performs with respect to all of the following qualities: consistency, essentiality, generality, minimality, cohesion and information hiding. As appropriate, you also should use comments in your MIS to explain your intentions.
At the end of your design specification, provide answers to the following questions:
1. Draw a UML diagram for the modules in A3.
2. Draw a control flow graph for the convex hull algorithm. The graph should followthe approach used by the Ghezzi et al. textbook. In particular, the code statements should be edges of the graph, not nodes. Code for the convex hull algorithm can be found at: https://startupnextdoor.com/computing-convex-hull-in-python/. To match the diagrams available from Ghezzi, replace the for loop in the code with a while loop.