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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game and Author Class initialization #41

Merged
merged 2 commits into from
Jun 1, 2022
Merged

Game and Author Class initialization #41

merged 2 commits into from
Jun 1, 2022

Conversation

ZahraArshia
Copy link
Collaborator

Hello guys 馃槉

this step requirements:

  • Create a Game class in a separate .rb file.

  • Create an Author class with an association to the Item class (in a separate .rb file).

  • All Game class properties visible in the diagram should be defined and set up in the constructor method.

  • All Author class properties visible in the diagram should be defined and set up in the constructor method.

  • Implement methods:

    • add_item method in the Author class
      • should take an instance of the Item class as an input
      • should add the input item to the collection of items
      • should add self as a property of the item object (by using the correct setter from the item object)
    • can_be_archived?() in the Game class
      • should override the method from the parent class
      • should return true if parent's method returns true AND if last_played_at is older than 2 years
      • otherwise, it should return false

@ZahraArshia ZahraArshia changed the title Game Game and Author Class initialization May 31, 2022
Copy link
Owner

@bushmusi bushmusi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @ZahraArshia

You have done a great job. Let us merge it and finalize the project

  • No linter error
  • Followed OOD
  • Followed ruby best practice

@ZahraArshia
Copy link
Collaborator Author

Thank you, @bushmusi 馃槃

@ZahraArshia ZahraArshia merged commit a9e545b into develop Jun 1, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants