[Hacktoberfest] Refactor games.py
Closed this issue · 3 comments
The current code is messy. there are "better ways" following the "good practices" to do the same thing.
Currently the Game
class inherits the Player
class so it could use the some attributes of the Player class, Since a game only has one dealer we reference the instance of the Game class as the dealer, This can be considered as a potential bad practice.
A better way of doing it would be, adding an is_dealer: boot
attribute to the Player class, so the Game class doesn't need to inherit the player class and considering dealer as a instance of the Player class itself with is_dealer
attribute set True, This would leave some unused attributes which we could then remove.
working on it. please assign.
This issue is resolved as of the latest PR