Class: Core::Models::Campaigns::Map
- Inherits:
-
Object
- Object
- Core::Models::Campaigns::Map
- Includes:
- Mongoid::Document, Mongoid::Timestamps
- Defined in:
- lib/core/models/campaigns/map.rb
Overview
A map is a battleground where the players can place tokens and live the adventure.
Instance Attribute Summary collapse
-
#campaign ⇒ Core::Models::Campaign
The campaign in which the map can be found.
-
#height ⇒ Integer
The number of lines in the map matric.
-
#positions ⇒ Array<Core::Model::Campaigns::TokenPosition>
The instanciated tokens on this map.
-
#width ⇒ Integer
The number of columns in the map matric.
Instance Attribute Details
#campaign ⇒ Core::Models::Campaign
Returns the campaign in which the map can be found.
23 |
# File 'lib/core/models/campaigns/map.rb', line 23 belongs_to :campaign, class_name: 'Core::Models::Campaign', inverse_of: :maps |
#height ⇒ Integer
Returns the number of lines in the map matric.
16 |
# File 'lib/core/models/campaigns/map.rb', line 16 field :height, type: Integer, default: 1 |
#positions ⇒ Array<Core::Model::Campaigns::TokenPosition>
Returns the instanciated tokens on this map.
27 |
# File 'lib/core/models/campaigns/map.rb', line 27 :positions, class_name: 'Core::Models::Campaigns::TokenPosition', inverse_of: :map |
#width ⇒ Integer
Returns the number of columns in the map matric.
19 |
# File 'lib/core/models/campaigns/map.rb', line 19 field :width, type: Integer, default: 1 |