Class: RubyArena::Level
- Inherits:
-
Object
- Object
- RubyArena::Level
- Defined in:
- lib/ruby_arena/level.rb
Constant Summary collapse
- LEVELS =
{ 0 => { robots: [ { ai: Level0, x: 600, y: 300 } ], user_robot_options: { x: 200, y: 300 } }, 1 => { robots: [ { ai: Level1, x: 600, y: 300 } ], user_robot_options: { x: 200, y: 300 } } }
Instance Attribute Summary collapse
-
#level ⇒ Object
readonly
Returns the value of attribute level.
Instance Method Summary collapse
-
#initialize(level) ⇒ Level
constructor
A new instance of Level.
- #options_for_cpu_robots ⇒ Object
- #options_for_user_robot ⇒ Object
Constructor Details
#initialize(level) ⇒ Level
Returns a new instance of Level.
20 21 22 23 |
# File 'lib/ruby_arena/level.rb', line 20 def initialize(level) @level = level exit_if_level_is_not_defined end |
Instance Attribute Details
#level ⇒ Object (readonly)
Returns the value of attribute level.
18 19 20 |
# File 'lib/ruby_arena/level.rb', line 18 def level @level end |