From: Clayton Smith Date: 2005-11-26T04:12:33+09:00 Subject: Re: RRobots - ducks, armed and dangerous Another robot to play with... require 'robot' class Testing include Robot def initialize bf super(bf) @saw_robot = false end def tick events accelerate 1 if @saw_robot direction = time%2==0 ? -1 : 1 turn_gun 20*direction turn 1*direction @saw_robot = false else turn_gun 10 turn 2 end if !events['robot_scanned'].empty? fire 1 @saw_robot=true end end end --- this robot may have problems if it gets stuck in a corner or along the side but so far it has seemed effective against those posted.