module RTanque::Bot::BrainHelper
Some helpful constants and methods for use as mixin in {RTanque::Bot::Brain}
Constants
- BOT_RADIUS
- MAX_BOT_ROTATION
- MAX_BOT_SPEED
- MAX_FIRE_POWER
- MAX_HEALTH
- MAX_RADAR_ROTATION
- MAX_TURRET_ROTATION
- MIN_FIRE_POWER
Public Instance Methods
at_tick_interval(num_of_ticks) { || ... }
click to toggle source
Run block every 'num_of_ticks' @param [Integer] num_of_ticks tick interval at which to execute block @yield @return [void]
# File lib/rtanque/bot/brain_helper.rb, line 18 def at_tick_interval(num_of_ticks) yield if sensors.ticks % num_of_ticks == 0 end