Open egelja opened 11 months ago
terrain::Terrain::get_path_type
should have at least 3^3 -1 possible outputs. To be honest having a complexity of less than 26 is impressive.
Message call back is just three switch statements.
Three of those are main
type functions.
I think I brought get_first_not below 10.
terrain::Chunk::Chunk is not great, but its three discrete parts.
Cyclomatic complexity of current main branch.
[x] 13 main@230-296@./src/main.cpp
There are also three duplicated blocks. Two are in terrain base and deal with grass initialization, the third is in terrain generation. Terrain generation will not be updated until Lua is implemented #17.
Most linters warn on cyclomatic complexity of 10.
terrain::Terrain::get_path_type
has a complexity of 25.Here are all the functions that need to be refactored:![image](https://github.com/AlemSnyder/Fun-Game/assets/76668284/4c1bebf4-4c18-46f5-983b-77ad25f1c88d)