Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SLU09 | OOP Basics - Exercise notebook : Exercise 7 #9

Open
rosa-rmsb opened this issue May 5, 2024 · 0 comments
Open

SLU09 | OOP Basics - Exercise notebook : Exercise 7 #9

rosa-rmsb opened this issue May 5, 2024 · 0 comments

Comments

@rosa-rmsb
Copy link

rosa-rmsb commented May 5, 2024

Where it's written "It will have the following attributes:" could it be "It will have the following methods:";
And where it's written "takes a player as attribute" could it be "takes a player an argument"?


Original text:

It will have the following attributes:

  • hire_player, takes a player as attribute. This method should check if the salary is equal to or lower than the budget, and if so add the player to the list of players, and remove their salary from the budget. If the team does not have enough budget to hire the player you should print something that helps you know that happened (your choice).
  • fire_player, takes a player as attribute. This method should remove the player from the list of players, and add their salary back to the budget.
  • reset_points, takes no arguments. This method should set the points_in_game back to 0
  • all_players_attempt_to_score, takes no arguments. This method should start by calling the reset_points method, then loop over every player on the team and have each of them attempt to score (using the player's attempt_to_score method). For each one that scores it should increment points_in_game by 1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant