kunderwood1 / Dungeon-Refactor

Refactoring! Choose a team of 3 (preferred) or 2 (ok) for this assignment DungeonSource.zip The zip file above contains an assignment specification for the first version of the Heroes and Monsters assignment given way back in 2001. The zip also contains the instructor's source code for the solution to the assignment. It is your job to refactor that code to improve structure, readability, maintainability, and usability. Employ the Object Oriented concepts you have learned throughout the quarter to accomplish this task. Utilize patterns, code smell refactors, OO principles (e.g. 'favor composition over inheritance' or 'program to an interface, not an implementation). Any improvement you can make to the existing design is a refactor. Something as simple as changing visibility of a method or field suffices. Choosing better names is also legitimate. There are many ways to refactor the given code. There are a multitude of code smells. Futhermore, some of the code uses (arguably) outdated tools from the Java API. You are welcome to employ current tools that do the job better as you deem necessary. Include in your submission the following items in a zip file: Your refactored version of the code Single .pdf of the UML diagrams that represent your (improved) design A *detailed* document describing each refactor you performed and why -- YOU MUST NUMBER EACH ITEM YOU REFACTOR. Be sure and include the offending code as part of your description. Note that snippets of the offending code suffice. NOTE/QUESTION: How many refactors should you have? The closer to 8 you get, the closer you will be to full credit. More specifically, you should have at least 8 refactors. Note that it is okay to submit more than 8 to cover yourself if you are unsure something is a true refactor. NOTE 2: Renaming fields and methods collectively is a single refactor... HAVE FUN!
2 stars 2 forks source link

Hero/monster Factorys: Smell-Combinatorial Explosion #4

Open kunderwood1 opened 4 years ago

kunderwood1 commented 4 years ago

need to set up a hero factory so we can get rid of some of the switch statments

DamienRodriguez commented 4 years ago

I'd like to attempt to tackle this problem.

hewrtarkhany commented 4 years ago

i am gonna try removing the protected fields make them private and provide getters and setters

DamienRodriguez commented 4 years ago

Hewr helped me realize that we should move the attack interface to its own issue, and discuss what we would like to do with that.

kunderwood1 commented 4 years ago

I thought that was the idea

Factory to create the monsters/heros that implement the Attack interface.

DamienRodriguez commented 4 years ago

if (!brainWorking) return "I'm sorry kevin-senpai"

kunderwood1 commented 4 years ago

you're good no worries.