Class: RPG::Troop

Inherits:
Object
  • Object
show all
Defined in:
lib/rpg/troop.rb

Defined Under Namespace

Classes: Member, Page

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeTroop


5
6
7
8
9
10
# File 'lib/rpg/troop.rb', line 5

def initialize
  @id = 0
  @name = ""
  @members = []
  @pages = [RPG::BattleEventPage.new] # Shouldn't this be [RPG::Troop::Member.new] ?
end

Instance Attribute Details

#idObject

Troop ID.


13
14
15
# File 'lib/rpg/troop.rb', line 13

def id
  @id
end

#membersObject

Troop members. An Member array.


20
21
22
# File 'lib/rpg/troop.rb', line 20

def members
  @members
end

#nameObject

Troop name.


16
17
18
# File 'lib/rpg/troop.rb', line 16

def name
  @name
end

#pagesObject

Battle events. An Page array.


24
25
26
# File 'lib/rpg/troop.rb', line 24

def pages
  @pages
end