Class: NewGame
- Inherits:
-
Object
- Object
- NewGame
- Defined in:
- lib/destiny.rb
Instance Attribute Summary collapse
-
#char_name ⇒ Object
Returns the value of attribute char_name.
-
#save_slot ⇒ Object
Returns the value of attribute save_slot.
Instance Method Summary collapse
- #answer_was(game_select = "yes") ⇒ Object
-
#initialize(new_game) ⇒ NewGame
constructor
A new instance of NewGame.
Constructor Details
#initialize(new_game) ⇒ NewGame
Returns a new instance of NewGame.
83 84 85 |
# File 'lib/destiny.rb', line 83 def initialize new_game @new_game = new_game end |
Instance Attribute Details
#char_name ⇒ Object
Returns the value of attribute char_name.
81 82 83 |
# File 'lib/destiny.rb', line 81 def char_name @char_name end |
#save_slot ⇒ Object
Returns the value of attribute save_slot.
81 82 83 |
# File 'lib/destiny.rb', line 81 def save_slot @save_slot end |
Instance Method Details
#answer_was(game_select = "yes") ⇒ Object
87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/destiny.rb', line 87 def answer_was game_select="yes" @game_select = game_select #should probably be a case statement that verifies that only yes, y, no, or n was entered # and ignores caps (lower and upper are valid) if @game_select == "yes" puts # formatting puts "Starting a new game, please enter character name:" # @character_name = gets else # Here I will display both save slots with the character names. "Please select a game to load:" end end |