Ejemplo n.º 1
0
def commands():
    """ loop of bot's commands"""
        
    """to lock the radar with the gun"""
    gamefile.lockradar("GUN")
        
    """to lock the unlock radar"""
    gamefile.lockradar("FREE")
       
    """To fire"""  
    gamefile.fire(2)

    """To know the number of alive bot"""
    gamefile.nbr_bots_left()

    """To turn left in degrees"""
    gamefile.turn_left(180)
    
    """To go forward 180 steps"""
    gamefile.move(180)
    
    """To turn Right in degrees"""
    gamefile.turn_right(180)
    
    """To go forward 180 steps"""
    gamefile.move(180)
    
    """NECESSARY for the end of the loop"""
    gamefile.done()
def commands():
        gamefile.move(200)
	gamefile.turn_right(90)
	gamefile.stop(100)
	gamefile.move(22)
	gamefile.turn_right(90)
	gamefile.fire()
	gamefile.done()
Ejemplo n.º 3
0
def commands():
        gamefile.move(200)
	gamefile.turn_right(90)
	gamefile.stop(100)
	gamefile.move(22)
	gamefile.turn_right(90)
	gamefile.fire(2)
	gamefile.done()
Ejemplo n.º 4
0
def commands():
    gamefile.move(200)
    gamefile.turn_left(90)
    gamefile.fire(2)
    gamefile.turn_left(90)
    gamefile.fire(2)
    gamefile.turn_left(90)
    gamefile.fire(2)
    gamefile.turn_left(90)
    gamefile.fire(2)
    gamefile.done()
Ejemplo n.º 5
0
def commands():
        gamefile.move(180)
	gamefile.fire(2)
        gamefile.stop(180)
        gamefile.fire(2)
	gamefile.turn_left(120)
        gamefile.fire(2)
	gamefile.turn_right(120)
        gamefile.fire(2)
	gamefile.turn_right(120)
        gamefile.fire(2)
	gamefile.turn_left(120)
        gamefile.fire(2)
	gamefile.done()
Ejemplo n.º 6
0
def commands():
    gamefile.move(100)
    gamefile.lockradar("FREE")
    gamefile.spinradar("LEFT")
    if (healthVal > 40):
        gamefile.turn_left(45)
    gamefile.spinradar("RIGHT")
    if (healthVal > 40):
        gamefile.stop(60)
    gamefile.fire()
    gamefile.move(100)
    if (healthVal > 40):
        gamefile.turn_right(45)
    if (healthVal < 40):
        if (lastTarget > 0):
            gamefile.turn_right(45)
        if (lastTarget < 0):
            gamefile.turn_left(45)

    global healthVal
    healthVal = gamefile.robotHealth()
    gamefile.done()
Ejemplo n.º 7
0
def commands():
        gamefile.move(100)
        gamefile.lockradar("FREE")
        gamefile.spinradar("LEFT")
        if (healthVal > 40):
                gamefile.turn_left(45)
        gamefile.spinradar("RIGHT")
        if (healthVal > 40):
                gamefile.stop(60)
	gamefile.fire(2)
	gamefile.move(100)
	if (healthVal > 40):
                gamefile.turn_right(45)
        if (healthVal < 40):
                if (lastTarget > 0):
                        gamefile.turn_right(45)
                if (lastTarget < 0):
                        gamefile.turn_left(45)
                
	
	global healthVal
	healthVal = gamefile.robotHealth()
	gamefile.done()
Ejemplo n.º 8
0
def commands():
    gamefile.move(200)
    gamefile.stop(100)
    gamefile.turn_left(90)
    gamefile.done()
Ejemplo n.º 9
0
def commands():
        gamefile.move(200)
        gamefile.stop(100)
	gamefile.turn_left(90)
	gamefile.done()