Class: Northshre
- Inherits:
-
Object
- Object
- Northshre
- Defined in:
- lib/northshire.rb
Instance Attribute Summary collapse
-
#fightchance ⇒ Object
Returns the value of attribute fightchance.
-
#locations ⇒ Object
Returns the value of attribute locations.
-
#monsters ⇒ Object
Returns the value of attribute monsters.
-
#name ⇒ Object
Returns the value of attribute name.
-
#visit ⇒ Object
Returns the value of attribute visit.
Instance Method Summary collapse
-
#initialize(name = 'Northshire', locations = {'inn' => NorthshireInn, 'shop' => NorthshireShop, 'tavern' => NorthshireTavern, 'house' => NorthshireHouse}, visit = 0, fight_chance = 12, monsters = 1) ⇒ Northshre
constructor
A new instance of Northshre.
- #introduction ⇒ Object
- #look ⇒ Object
- #monster ⇒ Object
Constructor Details
#initialize(name = 'Northshire', locations = {'inn' => NorthshireInn, 'shop' => NorthshireShop, 'tavern' => NorthshireTavern, 'house' => NorthshireHouse}, visit = 0, fight_chance = 12, monsters = 1) ⇒ Northshre
Returns a new instance of Northshre.
8 9 10 11 12 13 14 |
# File 'lib/northshire.rb', line 8 def initialize(name = 'Northshire', locations = {'inn' => NorthshireInn, 'shop' => NorthshireShop, 'tavern' => NorthshireTavern, 'house' => NorthshireHouse}, visit = 0, fight_chance = 12, monsters = 1) @name = name @locations = locations @visit = visit @fightchance = fight_chance @monsters = monsters end |
Instance Attribute Details
#fightchance ⇒ Object
Returns the value of attribute fightchance.
6 7 8 |
# File 'lib/northshire.rb', line 6 def fightchance @fightchance end |
#locations ⇒ Object
Returns the value of attribute locations.
6 7 8 |
# File 'lib/northshire.rb', line 6 def locations @locations end |
#monsters ⇒ Object
Returns the value of attribute monsters.
6 7 8 |
# File 'lib/northshire.rb', line 6 def monsters @monsters end |
#name ⇒ Object
Returns the value of attribute name.
6 7 8 |
# File 'lib/northshire.rb', line 6 def name @name end |
#visit ⇒ Object
Returns the value of attribute visit.
6 7 8 |
# File 'lib/northshire.rb', line 6 def visit @visit end |
Instance Method Details
#introduction ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/northshire.rb', line 16 def introduction puts "You come upon a small town. The buildings here, though seemingly in full" puts "operation, have not been maintained well. You suspect this town doesnt get much" puts "trade or travellers. The people of this town seem to move slugishly, as if it" puts "were with great reluctance that they arive to wherever they are heading. The" puts "town itself had a depressed air about it and you find yourself experiencing an" puts "intense meloncholy merely by being there. You hope your time in this town will" puts "be short as you set off to discover what the town holds" end |
#look ⇒ Object
26 27 28 29 30 31 32 |
# File 'lib/northshire.rb', line 26 def look puts "The lack of care and maintanance of the buildings immediatly stand out to you," puts "but, inspite of this, their functions are easily recognizable. Along the" puts "gravelled road is a row of buildings. Of those buildings you notice a shop and" puts "a tavern right next to it. Further down the road is you notice an inn." puts "(shop, tavern, inn)" end |