Skip to content

Commit

Permalink
Adding files for game_author_preserve
Browse files Browse the repository at this point in the history
  • Loading branch information
gilberthappi committed Nov 30, 2023
1 parent bf6121c commit d366843
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
require_relative 'classes/author'

class App
attr_accessor :game, :author
attr_accessor :games, :authors

def initialize
@games = []
Expand Down
2 changes: 2 additions & 0 deletions data/author.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[{"first_name":"happi","last_name":"Gilbert"},
{"first_name":"Ivonne","last_name":"Friend"}]
1 change: 1 addition & 0 deletions data/game.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
[{"publish_date":"2023-01-02","multiplayer":true,"last_played_at":"2023-10-10"}]
4 changes: 2 additions & 2 deletions main.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ def main
puts '8. Add a music album'
puts '9. Add a game'
puts '10. Add an author'
puts '11. Exit'
puts '11. Save and Exit'

options = gets.chomp.to_i

Expand All @@ -42,7 +42,7 @@ def main
when 10
app.add_author
when 11
puts 'Thanks for using Catalog of my things app!'
app.save_data
break
else
puts 'Invalid option. Please try again.'
Expand Down

0 comments on commit d366843

Please sign in to comment.