AlemSnyder / Fun-Game

I am just practicing c++. Feal free to enjoy.
GNU General Public License v2.0
1 stars 0 forks source link

Refactoring #50

Open egelja opened 11 months ago

egelja commented 11 months ago

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

AlemSnyder commented 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.

AlemSnyder commented 11 months ago

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.

AlemSnyder commented 11 months ago

Cyclomatic complexity of current main branch.