Why my getScore() factory function doesnt work as it expected
Tac-Toe game and want to include a scoring system. I have created a factory function for players, but I am unable to implement the scoring functionality correctly. When I attempt to call player1.getScore(), it doesn’t seem to reflect the updated score. How can I properly implement and manage scores for each player?