yogarsdna / Laboratory-Project-Code-Refactoring

0 stars 0 forks source link

Data Clumps #7

Open yogarsdna opened 1 year ago

yogarsdna commented 1 year ago

Example 1 (game_client.py)

From Initializing Variables section (line 18)

your_name = ""
opponent_name = ""
game_round = 0
game_timer = 4
your_choice = ""
opponent_choice = ""
TOTAL_NO_OF_ROUNDS = 3
your_score = 0
opponent_score = 0

These variables represent related data and are used together in multiple parts of the code. Grouping them together into a separate class or data structure can improve code organization and reduce data clumps. It also allows better encapsulation and easier management of the related data.

LidiaIvanova commented 1 year ago

0,8