Global refactoring #1

Merged
yoxu merged 4 commits from anavoi-pr into main 2025-09-03 21:21:07 +02:00
Owner

Changes:

  • Fixed English grammar
  • Created Game class to encapsulate game logic
  • Replaced print statements with logging for seperating debug and info outputs
  • Improved file handling with context managers
  • Role assignment logic to prevent role depletion
  • Added role decorator
  • Updated input handling for clearer user feedback
  • Remove useless sleep calls
  • Introduced Player dataclass for player attributes. The players are stored in a dictionary with player names as keys, but the values are instances of that class.
  • Kill: more structured logic with checks for protection and love status. (unused function atm)
  • Lovers are managed using a tuple
  • Renamed player and role files
  • Added debug status function
  • Safer file handling

With the new logging system, log level should be set to INFO for players (narrator). Debug information is shown in log level DEBUG.

Changes: - Fixed English grammar - Created Game class to encapsulate game logic - Replaced print statements with logging for seperating debug and info outputs - Improved file handling with context managers - Role assignment logic to prevent role depletion - Added role decorator - Updated input handling for clearer user feedback - Remove useless sleep calls - Introduced Player dataclass for player attributes. The players are stored in a dictionary with player names as keys, but the values are instances of that class. - Kill: more structured logic with checks for protection and love status. (unused function atm) - Lovers are managed using a tuple - Renamed player and role files - Added debug status function - Safer file handling With the new logging system, log level should be set to INFO for players (narrator). Debug information is shown in log level DEBUG.
yoxu approved these changes 2025-09-03 21:19:43 +02:00
yoxu left a comment
Owner

LGTM perfect 👍

LGTM perfect 👍
yoxu merged commit 39c42b8d0d into main 2025-09-03 21:21:07 +02:00
yoxu deleted branch anavoi-pr 2025-09-03 21:21:07 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
yoxu/WereWolfGame!1
No description provided.