Analysis of a python game (Clash of Clans), with a uml diagram, list of bugs and code smells
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
└── ...
Remove Unused imports
Village.py
methodUpdate()
is never usedcheckBuilding()
andcheckTroop()
always returntrue
and are not required, they are used only becauseAddBuildingOrWeaponToVillage()
is actually used as anAddBuilding()
andAddTroop()
is used for troop
- Lazy Class, can replace the appropriate functions directly in Game.py
- Lazy Classes, can replace the with functions make small change in Game.py
Readme doesn't mention that the terminal must be in full size for the program to run