-
Notifications
You must be signed in to change notification settings - Fork 0
/
flashcard_view.rb
75 lines (66 loc) · 3.46 KB
/
flashcard_view.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
class DeckViewer
def game_welcome_message
title = File.read('title.txt')
puts title
puts "RJD Flashcard game!"
puts "-----------------------------------------------"
end
def ask_deck_to_play
puts "Enter the name of the deck you'd like to play. If you prefer to exit, enter \"exit\""
end
def display_deck_options(decks_arr)
decks_arr.each do |deck|
puts "#{deck}"
sleep(1.0)
end
end
def deck_welcome_message(deck)
puts "Welcome to #{deck.name}! To advance, enter the correct term for each definition."
puts "Let's get ready to rumble!!!!"
puts
end
def display_card_definition(card)
puts " _______________________________________________________________________________"
puts "| |"
puts "| " + "Current Definition".center(77)+ " |"
puts "| ______________________________________________________________________________|"
puts "| |"
puts "| |"
puts "| |"
puts "| |"
puts "| |"
puts "| |"
puts "| |"
puts "| |"
puts "| |"
puts "| |"
puts "| " + card.definition.center(77) + " |"
puts "| |"
puts "| |"
puts "| |"
puts "| |"
puts "| |"
puts "| |"
puts "| |"
puts "| |"
puts "| |"
puts "| |"
puts "| |"
puts "|_______________________________________________________________________________|"
puts "Enter term:"
end
def display_card_guessed_correctly
puts "Correct!"
end
def display_card_guessed_incorrectly
puts "Nope, got it wrong. On to the next card!"
end
def display_all_cards_guessed
puts "Congratulations, you've completed all the cards!"
sleep(1.0)
puts
end
def display_exit_game_message
puts "Exiting the flashcard program. Have a nice day!"
end
end