Skip to content
This repository has been archived by the owner on Apr 2, 2024. It is now read-only.

Latest commit

 

History

History
62 lines (39 loc) · 1.57 KB

README.md

File metadata and controls

62 lines (39 loc) · 1.57 KB

Python-game-analysis

DASS Assignment 2

Analysis of a python game (Clash of Clans), with a uml diagram, list of bugs and code smells

Code Smells

2) Repeated code files (Bonus)

Restructure directory as

.
├── README.md
├── game.py
├── replay.py
├── src
│   ├── army.py
│   ├── central_processing_unit.py
│   ├── engine.py
│   ├── infrastructure.py
│   ├── input.py
│   ├── starting_ending.py
│   └── village.py
└── replays
    └── ...

4) Unused Imports

Remove Unused imports

5) Unnecessary Code

  • Village.py method Update() is never used
  • checkBuilding() and checkTroop() always return true and are not required, they are used only because AddBuildingOrWeaponToVillage() is actually used as an AddBuilding() and AddTroop() is used for troop

6) Unnecessary Class StartingEnding (Bonus)

  • Lazy Class, can replace the appropriate functions directly in Game.py

8) Unnecessary Classes in input.py (Bonus)

  • Lazy Classes, can replace the with functions make small change in Game.py

Bugs

1) Full size terminal (Bonus)

Readme doesn't mention that the terminal must be in full size for the program to run