PV260 Software Quality Assignment 1 - Code Refactoring Spring 2021 1 General Information 1.1 Dates • Assignment start: 1.4.2021 • Dry Run submission: 15.4.2021 16:00 • Dry Run notification: 22.4.2021 • Assignment deadline: 29.4.2021 16:00 1.2 Submission Please submit your solution as a txt file with link to a Github/GitLab/Bitbucket/... repository to the Homework vault (Odevzd´avarna) called [Java Lasaris]Assignment 1: Refactoring: https://is.muni.cz/auth/el/fi/jaro2021/PV260/ode/java_lasaris_assignment_1_refactoring/. • The solution should be submitted as Maven project. • The tasks should be solved in the groups of two. • Name of the submitted file should be as follows: lastname1-lastname2-assignment1.txt. • Only one solution per group should be submitted. 1.3 Evaluation The maximum points for this is assignment is 15. The points will be distributed based on both fulfilling the functional requirements, compliance of the code with SOLID and Clean Code principles and proper git usage. Additional points can be awarded for high quality solutions. 1.4 Project This assignment works with the following project: • TRON game: http://www.mediafire.com/download/ucj53886o8a1164/Tron.zip 2 Mandatory Tasks The following tasks are not meant to be completed in any particular order. 2.1 Task 1 • Make it possible to add more players to TRON easily (so 3,4,5. . . people can play at the same time each with their own uniquely colored bike) • Addition or removal of players should be as simple as possible, take into account the collision detection, controls configuration, rendering etc. • Addition of player will be done offline, that is to change number of players the source of the game will be altered and the whole code recompiled. There is no need to create any kind of game menu. 1 2.2 Task 2 • Adapt current code to make it possible to use as much of it as possible as a generic engine for implementing other games. • Provide a way for these new implementations to bind with the engine, e.g. interfaces that need to be implemented. • Make the current TRON game such implementation of the engine. 2.3 Task 3 • Add the possibility to control any player by mouse (e.g. turn left or right using left and right mouse buttons respectively) 2.4 Task 4 • Separate the state of the game from its graphical representation, that is have one class or package represent the Model and other the Presentation. • The model must contain and provide access for the player bikes, events such as collision between two players happened and so forth. • There is no dependency from Model to Presentation, only from Presentation to Model • The model itself should not handle frame timing (Thread.sleep()), that is the responsibility of calling some update method on the model is outside of the model, preferably in the extracted engine code from previous tasks. 3 Optional Tasks 3.1 Task 5 • Use the extracted engine to implement some other game (e.g. pong, snake,...) 2