Skip to content

Commit

Permalink
Gretting user
Browse files Browse the repository at this point in the history
  • Loading branch information
MrCoffey committed Oct 17, 2014
1 parent 5c5716a commit 15c5052
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions dungeon.rb
Original file line number Diff line number Diff line change
@@ -1,16 +1,22 @@
=begin
/*Those classes aren't necessary due the Struct is suppling
/*their functions.
/*
/*If you ever need to add methods to Player or Room, you can uncomment them
/*and add the attributes back with attr_accessor.
/*
/*Struct were changed for entire class due they change their objects
Player = Struct.new(:name, :location)
Room = Struct.new(:reference, :name, :description, :connections)
=end
gretting = puts "Wellcome strainger do you have any name ?: "
puts "Yes my name is .. :"
@name = gets.chomp!.capitalize

while @name.length <= 0
puts "What is your name strainger:"
@name = gets.chomp!.capitalize
end

puts "So your name is #{@name} ? hu \n"




class Dungeon
attr_accessor :player
Expand Down Expand Up @@ -73,7 +79,7 @@ def full_description
end
end


=begin
# Create the main dungeon object
my_dungeon = Dungeon.new("Fred Bloggs")
# Add rooms to the dungeon
Expand All @@ -82,7 +88,7 @@ def full_description
# Start the dungeon by placing the player in the large cave
my_dungeon.start(:largecave)

=end



0 comments on commit 15c5052

Please sign in to comment.