Пример #1
0
 def __init__( self ):
     Robot.__init__( self )
     # Enquanto True o robô continua a funcionar
     self._alive = True
     # Controla a direcção do movimento do robô
     self._drection = 1
     # Inicia o robot
     self.init()
Пример #2
0
 def __init__( self ):
     Robot.__init__( self )
     self._alive = True
     self._hitWall = False
     # Lista com os objectos encontrados no rastreio
     self._targets = []
     # Inicia o robot
     self.init()
Пример #3
0
 def __init__( self ):
     Robot.__init__( self )
     self._alive = True
     # Inicia o robot
     self.init()
Пример #4
0
    input = raw_input(">>Comando: ")
    splited = input.split( " " )
    if ( len(splited) == 1 ):
        splited.append( 90 )
    return splited



if __name__ == '__main__':

    #time.sleep(0.0098)

    moving = "forward"
    alive = 1
    # cria um robot
    robot = Robot()

    

    robot.round_started = round_started
    robot.term_battle_room = term_battle_room
    robot.term_battle = term_battle
    robot.destroyed = destroyed
    robot.kicked_robot = kicked_robot
    robot.robot_destroyed = robot_destroyed
    robot.on_hit_wall = on_hit_wall
    robot.on_hit_robot = on_hit_robot
    robot.on_hit_by_bullet = on_hit_by_bullet
    robot.gun_overheat = gun_overheat
    robot.out_of_energy = out_of_energy
    robot.on_bullet_hit = on_bullet_hit