void StandardGraspPerformer::performGrasp(const object_manipulation_msgs::PickupGoal &pickup_goal,
                                          const object_manipulation_msgs::Grasp &grasp,
                                          GraspExecutionInfo &execution_info)
{
  execution_info.result_ = approachAndGrasp(pickup_goal, grasp, execution_info);
  if (execution_info.result_.result_code != GraspResult::SUCCESS) return;

  //check if there is anything in gripper; if not, open gripper and retreat
  if (!mechInterface().graspPostureQuery(pickup_goal.arm_name, grasp))
  {
    ROS_DEBUG_NAMED("manipulation","Hand reports that grasp was not successfully executed; "
                    "releasing object and retreating");
    mechInterface().handPostureGraspAction(pickup_goal.arm_name, grasp,
                                object_manipulation_msgs::GraspHandPostureExecutionGoal::RELEASE, -1);    
    retreat(pickup_goal, grasp, execution_info);
    execution_info.result_ = Result(GraspResult::GRASP_FAILED, false);
    return;
  }
  
  //attach object to gripper
  if (!pickup_goal.collision_object_name.empty())
  {
    mechInterface().attachObjectToGripper(pickup_goal.arm_name, pickup_goal.collision_object_name);
  }

  execution_info.result_ = lift(pickup_goal, grasp, execution_info);
}
Ejemplo n.º 2
0
void MatchACommand( int (*advance)(char *), int (*retreat)(char *) )
/******************************************************************/
{
    int advanced;

    SaveLine();
    advanced = 0;
    for( ;; ) {
        ++advanced;
        MaxCursor = advance( Line );
        if( MaxCursor == 0 ) {
            while( --advanced >= 0 ) {
                MaxCursor = retreat( Line );
            }
            RestoreLine();
            return;
        }
        if( MaxCursor < OldCursor ) continue;
        if( Equal( OldLine, Line, OldCursor ) ) break;
    }
    Draw = TRUE;
    Base = 0;
    Edited = FALSE;
    FirstNextOrPrev = FALSE;
}
Ejemplo n.º 3
0
bool simple_ctable::iter::prev(bool row)
{
	if(row)
		number = 0;
	else if(prev_column())
		return true;
	return retreat(true);
}
Ejemplo n.º 4
0
int is_palindrome(char line[]) {
	int left = 0, right = strlen(line) - 1;

	// find intitial left and right indices of valid letters
	right = retreat( right, line );
	left = advance( left, right, line );
	
	while( tolower(line[ left ]) == tolower(line[ right ]) ) {
		if( left != right && left + 1 != right ) {
			left++;		right--;
			left = advance( left, right, line );
			right = retreat( right, line );
		}
		// midpoint cases
		else if( left == right ) {
			return line[ left ] == line [ right ];
		}
		else if( left +1 == right ) {
			return line[ left ] == line [ right ];
		}
	}
	
	return 0 ;    /* not a palindrome */
}
Ejemplo n.º 5
0
int is_palindrome(char line[]) {

	int i; //Incrementation variable
	int eos_index = (strlen(line)-1); // end of string position

	int endval; // End value
	int startval; // Start value

	int startcursor = 0; //Keeps track of cursor from beginning
	int endcursor = eos_index; //Keeps track of cursor from end


	for(i = 0; i < strlen(line); i++){
		
		if(startcursor == endcursor){
			return 1; /*is a palindrome */
		}

		else if(startcursor > endcursor){
			if ((startcursor == endcursor +1) && (tolower(startval) == tolower(endval))){
				return 1; /*is a palindrome */ 
			}
			break;
		}

		else if(startcursor < endcursor){	
		
			startcursor = i;
			endcursor = (strlen(line)-1)-i;
		
			endval = line[endcursor];
			startval = line[startcursor];
		

			if(tolower(startval) != tolower(endval)){
				break;
			}
			
			startcursor = advance(i,eos_index,line);
			endcursor = retreat(endcursor,line);

		}
		
	}

	return 0 ; /* not a palindrome */
}
Ejemplo n.º 6
0
task main()
{
	initializeRobot();
	waitForStart();
	raiseArm(ArmUpRotations);
	intializeClaw();

  int _dirAC = 0;

  wait1Msec(200);

  int sensorDirection = HTIRS2readDCDir(irSeeker);

  if(sensorDirection < 5){
  	raiseArm(LeftArmUpRotations);
  	leftTurn(leftTurnRotations);
  	attackRack(leftFinalInches);
	}
	else{
		firstMove(middleStartInches);

		wait1Msec(300);
		sensorDirection = HTIRS2readDCDir(irSeeker);
		if(sensorDirection < 7){
			leftTurn(middleTurnRotations);
			attackRack(middleFinalInches);
		}
		else{
			raiseArm(RightArmUpRotations);
			firstMove(rightStartInches - middleStartInches);
			leftTurn(middleTurnRotations);
			attackRack(rightFinalInches);
		}
	}
	retreat();
}
Ejemplo n.º 7
0
/*
 *	Remove node from tree.
 *	avl_delete does the local tree manipulations,
 *	calls retreat() to rebalance tree up to its root.
 */
void
avl_delete(
    register avltree_desc_t *tree,
    register avlnode_t *np)
{
    register avlnode_t *forw = np->avl_forw;
    register avlnode_t *back = np->avl_back;
    register avlnode_t *parent = np->avl_parent;
    register avlnode_t *nnext;


    if (np->avl_back) {
        /*
         * a left child exits, then greatest left descendent's nextino
         * is pointing to np; make it point to np->nextino.
         */
        nnext = np->avl_back;
        while (nnext) {
            if (!nnext->avl_forw)
                break; /* can't find anything bigger */
            nnext = nnext->avl_forw;
        }
    } else if (np->avl_parent) {
        /*
         * find nearest ancestor with lesser value. That ancestor's
         * nextino is pointing to np; make it point to np->nextino
         */
        nnext = np->avl_parent;
        while (nnext) {
            if (AVL_END(tree, nnext) <= AVL_END(tree, np))
                break;
            nnext = nnext->avl_parent;
        }
    } else
        nnext = NULL;

    if (nnext) {
        ASSERT(nnext->avl_nextino == np);
        nnext->avl_nextino = np->avl_nextino;
        /*
         *	Something preceeds np; np cannot be firstino.
         */
        ASSERT(tree->avl_firstino != np);
    }
    else {
        /*
         *	Nothing preceeding np; after deletion, np's nextino
         *	is firstino of tree.
         */
        ASSERT(tree->avl_firstino == np);
        tree->avl_firstino = np->avl_nextino;
    }


    /*
     * Degenerate cases...
     */
    if (forw == NULL) {
        forw = back;
        goto attach;
    }

    if (back == NULL) {
attach:
        if (forw)
            forw->avl_parent = parent;
        if (parent) {
            if (parent->avl_forw == np) {
                parent->avl_forw = forw;
                retreat(tree, parent, AVL_BACK);
            } else {
                ASSERT(parent->avl_back == np);
                parent->avl_back = forw;
                retreat(tree, parent, AVL_FORW);
            }
        } else {
            ASSERT(tree->avl_root == np);
            tree->avl_root = forw;
        }
        avl_checktree(tree, tree->avl_root);
        return;
    }

    /*
     * Harder case: children on both sides.
     * If back's avl_forw pointer is null, just have back
     * inherit np's avl_forw tree, remove np from the tree
     * and adjust balance counters starting at back.
     *
     * np->	    xI		    xH	(befor retreat())
     *	    / \		    / \
     * back->  H   J	   G   J
     *	  /   / \             / \
     *       G   ?   ?           ?   ?
     *      / \
     *     ?   ?
     */
    if ((forw = back->avl_forw) == NULL) {
        /*
         * AVL_FORW retreat below will set back's
         * balance to AVL_BACK.
         */
        back->avl_balance = np->avl_balance;
        back->avl_forw = forw = np->avl_forw;
        forw->avl_parent = back;
        back->avl_parent = parent;

        if (parent) {
            if (parent->avl_forw == np)
                parent->avl_forw = back;
            else {
                ASSERT(parent->avl_back == np);
                parent->avl_back = back;
            }
        } else {
            ASSERT(tree->avl_root == np);
            tree->avl_root = back;
        }

        /*
         * back is taking np's place in the tree, and
         * has therefore lost a avl_back node (itself).
         */
        retreat(tree, back, AVL_FORW);
        avl_checktree(tree, tree->avl_root);
        return;
    }

    /*
     * Hardest case: children on both sides, and back's
     * avl_forw pointer isn't null.  Find the immediately
     * inferior buffer by following back's avl_forw line
     * to the end, then have it inherit np's avl_forw tree.
     *
     * np->	    xI			      xH
     *	    / \			      / \
     *         G   J	     back->  G   J   (before retreat())
     *	  / \			    / \
     *       F   ?...		   F   ?1
     *      /     \
     *     ?       H  <-forw
     *	      /
     *	     ?1
     */
    while ((back = forw->avl_forw))
        forw = back;

    /*
     * Will be adjusted by retreat() below.
     */
    forw->avl_balance = np->avl_balance;

    /*
     * forw inherits np's avl_forw...
     */
    forw->avl_forw = np->avl_forw;
    np->avl_forw->avl_parent = forw;

    /*
     * ... forw's parent gets forw's avl_back...
     */
    back = forw->avl_parent;
    back->avl_forw = forw->avl_back;
    if (forw->avl_back)
        forw->avl_back->avl_parent = back;

    /*
     * ... forw gets np's avl_back...
     */
    forw->avl_back = np->avl_back;
    np->avl_back->avl_parent = forw;

    /*
     * ... and forw gets np's parent.
     */
    forw->avl_parent = parent;

    if (parent) {
        if (parent->avl_forw == np)
            parent->avl_forw = forw;
        else
            parent->avl_back = forw;
    } else {
        ASSERT(tree->avl_root == np);
        tree->avl_root = forw;
    }

    /*
     * What used to be forw's parent is the starting
     * point for rebalancing.  It has lost a avl_forw node.
     */
    retreat(tree, back, AVL_BACK);
    avl_checktree(tree, tree->avl_root);
}
Ejemplo n.º 8
0
bool simple_ctable::iter::last()
{
	source->last();
	return retreat();
}
Ejemplo n.º 9
0
/*
 * Check if current player must retreat.
 *
 * We run this check from the point of view of the opponent.
 *
 * If current player must retreat, simulate the results.
 */
static void check_retreat(game *g)
{
	game sim;
	player *p, *opp;
	card *c;
	int i;
	int all_known = 1, moved = 0, bluff = 0;

	/* Do nothing if no fight to retreat from */
	if (!g->fight_started) return;

	/* Get opponent pointer */
	opp = &g->p[!g->turn];

	/* Loop over opponent cards */
	for (i = 1; i < DECK_SIZE; i++)
	{
		/* Get card pointer */
		c = &opp->deck[i];

		/* Skip inactive cards */
		if (!c->active) continue;

		/* Check for bluff card */
		if (c->bluff) bluff = 1;

		/* Skip cards with text ignored */
		if (c->text_ignored) continue;

		/* Skip cards without category 3 special text */
		if (c->d_ptr->special_cat != 3) continue;

		/* Skip cards that don't disallow calling bluff */
		if (c->d_ptr->special_effect !=(S3_YOU_MAY_NOT | S3_CALL_BLUFF))
			continue;

		/* Assume no bluff cards are in play */
		bluff = 0;
		break;
	}

	/* Do not check for forced retreat if bluff may be called */
	if (bluff) return;

	/* Simulate game */
	simulate_game(&sim, g);

	/* Get player pointer */
	p = &sim.p[sim.turn];

	/* Loop over cards */
	for (i = 1; i < DECK_SIZE; i++)
	{
		/* Get card pointer */
		c = &p->deck[i];

		/* Skip cards not in hand */
		if (c->where != LOC_HAND) continue;

		/* Check for unknown card */
		if (!c->loc_known) all_known = 0;
	}

	/* Check for not all cards in hand known */
	if (!all_known)
	{
		/* Pretend all unknown cards are in hand */
		for (i = 1; i < DECK_SIZE; i++)
		{
			/* Get card pointer */
			c = &p->deck[i];

			/* Skip cards with known locations */
			if (c->loc_known && !c->random_fake) continue;

			/* Clear "random" flag */
			c->random_fake = 0;

			/* Move card to hand */
			c->where = LOC_HAND;

			/* Count cards moved */
			moved++;
		}
	}

	/* XXX Do nothing if most cards moved */
	if (moved > 15) return;

	/* Set retreat flag */
	must_retreat = 1;
	checking_retreat = 1;

	/* Simulate possible actions */
	find_action(&sim);

	/* Check for retreat flag still set */
	if (must_retreat)
	{
		/* Force current player to retreat before evaluating score */
		retreat(g);
	}

	/* Clear retreat check flag */
	checking_retreat = 0;
}
Ejemplo n.º 10
0
/*
 * Perform the given action.
 */
static void perform_act(game *g, action a)
{
	player *p, *opp;
	int old_phase;

	/* Get player pointers */
	p = &g->p[g->turn];
	opp = &g->p[!g->turn];

	/* Remember current phase */
	old_phase = p->phase;

	/* Switch on action */
	switch (a.act)
	{
		/* No action, advance phase counter */
		case ACT_NONE:
		{
			/* Advance phase counter */
			p->phase++;

			/* Take care of bookkeeping */
			switch (old_phase)
			{
				/* Start of turn */
				case PHASE_START:

					/* Start turn */
					start_turn(g);

					/* Done */
					break;

				/* After support/booster */
				case PHASE_AFTER_SB:

					/* End support phase */
					end_support(g);
					
					/* Done */
					break;

				/* Refresh hand */
				case PHASE_REFRESH:

					/* Refresh */
					refresh_phase(g);

					/* Done */
					break;

				/* End of turn */
				case PHASE_END:

					/* End current turn */
					end_turn(g);

					/* Done */
					break;

				/* Move to next player */
				case PHASE_OVER:

					/* Player is done */
					p->phase = PHASE_NONE;

					/* Next player */
					g->turn = !g->turn;

					/* Start opponent's turn */
					opp->phase = PHASE_START;

					/* Done (completely) */
					return;
			}

			/* Clear last played card */
			p->last_played = 0;

			/* Done */
			break;
		}

		/* Retreat */
		case ACT_RETREAT:
		{
			/* Retreat */
			retreat(g);

			/* Done */
			break;
		}

		/* Retrieve a card */
		case ACT_RETRIEVE:
		{
			/* Set last played */
			p->last_played = a.index;

			/* Retrieve card */
			retrieve_card(g, a.arg);

			/* Done */
			break;
		}

		/* Play a card */
		case ACT_PLAY:
		{
			/* Set last played */
			p->last_played = a.index;

			/* Play card */
			play_card(g, a.arg, 0, 0);

			/* Done */
			break;
		}

		/* Play a card without special effect */
		case ACT_PLAY_NO:
		{
			/* Set last played */
			p->last_played = a.index;

			/* Play card */
			play_card(g, a.arg, 1, 0);

			/* Done */
			break;
		}

		/* Announce power */
		case ACT_ANN_FIRE:
		case ACT_ANN_EARTH:
		{
			/* Increment phase counter */
			p->phase++;

			/* Announce power */
			announce_power(g, a.act - ACT_ANN_FIRE);

			/* Done */
			break;
		}

		/* Use card special power */
		case ACT_USE:
		{
			/* Use card */
			use_special(g, a.arg);

			/* Done */
			break;
		}

		/* Satisfy opponent's "discard" card */
		case ACT_SATISFY:
		{
			/* Satisfy requirement */
			satisfy_discard(g, a.arg);

			/* Done */
			break;
		}

		/* Land a ship */
		case ACT_LAND:
		{
			/* Set last played */
			p->last_played = a.index;

			/* Land ship */
			land_ship(g, a.arg);

			/* Done */
			break;
		}

		/* Load a card onto a ship */
		case ACT_LOAD:
		{
			/* Set last played */
			p->last_played = a.index;

			/* Load card */
			load_card(g, a.arg, a.target);

			/* Done */
			break;
		}

		/* Play a bluff card */
		case ACT_BLUFF:
		{
			/* Set last played */
			p->last_played = a.index;

			/* Play bluff */
			play_bluff(g, a.arg);

			/* Done */
			break;
		}

		/* Reveal a bluff card */
		case ACT_REVEAL:
		{
			/* Set last played */
			p->last_played = a.index;

			/* Reveal bluff */
			reveal_bluff(g, g->turn, a.arg);

			/* Done */
			break;
		}
	}
}
Ejemplo n.º 11
0
Force::~Force() {
	retreat();
}
void takecareofobject()
{
  if ((blkiden==0)||(f1==0)) // OBJECT NOT THERE
  return;
  if (blkiden==1||blkiden==2) // OBJECT FOUND
  { 
  int i=0;
  turn('N');
  //_delay_ms(10);
  while(i<4000)
       {
	   PORTB |= (1<<0);
       PORTB &=~(1<<1);// holdin object
	   _delay_us(50);
	   PORTB |= (1<<0);
       PORTB |= (1<<1);
	   _delay_us(50);
	   i++;
	   PORTC|=(1<<3);

	   }
	   PORTC&=~(1<<3);
     linefollower();
	   
	   objx=currx;
       objy=curry; 
       
	   objtransport();
	   
	   turn('N');
	   
	  linefollower1();
	 
       turn('N');
      
       inchb();
	   inchb();
        i=0;
	  while(i<4000) 
	   {
	   PORTB &=~ (1<<0);
       PORTB |=(1<<1);// keepin object
	   _delay_us(85);
	   PORTB |= (1<<0);
       PORTB |= (1<<1);
	   _delay_us(15);
	   i++;
	   PORTC|=(1<<3);

	   }
	   PORTC&=~(1<<3);
	  inchb();
	  //inchb();
	   
	   turn('R');
	   if(ori==1)
		ori=3;
		else if(ori==2)
	    ori=4;  
	    else if(ori==3)
	    ori=1;
	    else if(ori==4)
	    ori=2;
	  
	   
	   
	  linefollower1();
	   
	   turn('N');
	   //inch();
       retreat();
	   blkiden=0;
	   f1=0;
	  
  
  }
  

}
Ejemplo n.º 13
0
void __start(int core_id, int num_crashes, unsigned char payload) {

  // Core 0 starts by checking taunt array,
  // then writes to opponents' data
  if (core_id == 0) {

    signed char *taunt_array = HOME_STATUS->taunt;

    // Unravel loop through taunt array twice
    if (taunt_array[0] != -1) {
      Alert_Guards(taunt_array[0]);
    }
    if (taunt_array[1] != -1) {
      Alert_Guards(taunt_array[1]);
    }
    if (taunt_array[2] != -1) {
      Alert_Guards(taunt_array[2]);
    }
    if (taunt_array[3] != -1) {
      Alert_Guards(taunt_array[3]);
    }
    if (taunt_array[4] != -1) {
      Alert_Guards(taunt_array[4]);
    }
    if (taunt_array[5] != -1) {
      Alert_Guards(taunt_array[5]);
    }
    if (taunt_array[6] != -1) {
      Alert_Guards(taunt_array[6]);
    }
    if (taunt_array[7] != -1) {
      Alert_Guards(taunt_array[7]);
    }
    if (taunt_array[8] != -1) {
      Alert_Guards(taunt_array[8]);
    }
    if (taunt_array[9] != -1) {
      Alert_Guards(taunt_array[9]);
    }
    if (taunt_array[10] != -1) {
      Alert_Guards(taunt_array[10]);
    }
    if (taunt_array[11] != -1) {
      Alert_Guards(taunt_array[11]);
    }
    if (taunt_array[12] != -1) {
      Alert_Guards(taunt_array[12]);
    }
    if (taunt_array[13] != -1) {
      Alert_Guards(taunt_array[13]);
    }
    if (taunt_array[14] != -1) {
      Alert_Guards(taunt_array[14]);
    }
    if (taunt_array[15] != -1) {
      Alert_Guards(taunt_array[15]);
    }
    if (taunt_array[16] != -1) {
      Alert_Guards(taunt_array[16]);
    }
    if (taunt_array[17] != -1) {
      Alert_Guards(taunt_array[17]);
    }
    if (taunt_array[18] != -1) {
      Alert_Guards(taunt_array[18]);
    }
    if (taunt_array[19] != -1) {
      Alert_Guards(taunt_array[19]);
    }
    if (taunt_array[20] != -1) {
      Alert_Guards(taunt_array[20]);
    }
    if (taunt_array[21] != -1) {
      Alert_Guards(taunt_array[21]);
    }
    if (taunt_array[22] != -1) {
      Alert_Guards(taunt_array[22]);
    }
    if (taunt_array[23] != -1) {
      Alert_Guards(taunt_array[23]);
    }
    if (taunt_array[24] != -1) {
      Alert_Guards(taunt_array[24]);
    }
    if (taunt_array[25] != -1) {
      Alert_Guards(taunt_array[25]);
    }
    if (taunt_array[26] != -1) {
      Alert_Guards(taunt_array[26]);
    }
    if (taunt_array[27] != -1) {
      Alert_Guards(taunt_array[27]);
    }
    if (taunt_array[28] != -1) {
      Alert_Guards(taunt_array[28]);
    }
    if (taunt_array[29] != -1) {
      Alert_Guards(taunt_array[29]);
    }
    if (taunt_array[30] != -1) {
      Alert_Guards(taunt_array[30]);
    }
    if (taunt_array[31] != -1) {
      Alert_Guards(taunt_array[31]);
    }
    if (taunt_array[32] != -1) {
      Alert_Guards(taunt_array[32]);
    }
    if (taunt_array[33] != -1) {
      Alert_Guards(taunt_array[33]);
    }
    if (taunt_array[34] != -1) {
      Alert_Guards(taunt_array[34]);
    }
    if (taunt_array[35] != -1) {
      Alert_Guards(taunt_array[35]);
    }
    if (taunt_array[36] != -1) {
      Alert_Guards(taunt_array[36]);
    }
    if (taunt_array[37] != -1) {
      Alert_Guards(taunt_array[37]);
    }
    if (taunt_array[38] != -1) {
      Alert_Guards(taunt_array[38]);
    }
    if (taunt_array[39] != -1) {
      Alert_Guards(taunt_array[39]);
    }
    if (taunt_array[40] != -1) {
      Alert_Guards(taunt_array[40]);
    }
    if (taunt_array[41] != -1) {
      Alert_Guards(taunt_array[41]);
    }
    if (taunt_array[42] != -1) {
      Alert_Guards(taunt_array[42]);
    }
    if (taunt_array[43] != -1) {
      Alert_Guards(taunt_array[43]);
    }
    if (taunt_array[44] != -1) {
      Alert_Guards(taunt_array[44]);
    }
    if (taunt_array[45] != -1) {
      Alert_Guards(taunt_array[45]);
    }
    if (taunt_array[46] != -1) {
      Alert_Guards(taunt_array[46]);
    }
    if (taunt_array[47] != -1) {
      Alert_Guards(taunt_array[47]);
    }
    if (taunt_array[48] != -1) {
      Alert_Guards(taunt_array[48]);
    }
    if (taunt_array[49] != -1) {
      Alert_Guards(taunt_array[49]);
    }
    if (taunt_array[50] != -1) {
      Alert_Guards(taunt_array[50]);
    }
    if (taunt_array[51] != -1) {
      Alert_Guards(taunt_array[51]);
    }
    if (taunt_array[52] != -1) {
      Alert_Guards(taunt_array[52]);
    }
    if (taunt_array[53] != -1) {
      Alert_Guards(taunt_array[53]);
    }
    if (taunt_array[54] != -1) {
      Alert_Guards(taunt_array[54]);
    }
    if (taunt_array[55] != -1) {
      Alert_Guards(taunt_array[55]);
    }
    if (taunt_array[56] != -1) {
      Alert_Guards(taunt_array[56]);
    }
    if (taunt_array[57] != -1) {
      Alert_Guards(taunt_array[57]);
    }
    if (taunt_array[58] != -1) {
      Alert_Guards(taunt_array[58]);
    }
    if (taunt_array[59] != -1) {
      Alert_Guards(taunt_array[59]);
    }
    if (taunt_array[60] != -1) {
      Alert_Guards(taunt_array[60]);
    }
    if (taunt_array[61] != -1) {
      Alert_Guards(taunt_array[61]);
    }
    if (taunt_array[62] != -1) {
      Alert_Guards(taunt_array[62]);
    }
    if (taunt_array[63] != -1) {
      Alert_Guards(taunt_array[63]);
    }
    if (taunt_array[64] != -1) {
      Alert_Guards(taunt_array[64]);
    }
    if (taunt_array[65] != -1) {
      Alert_Guards(taunt_array[65]);
    }
    if (taunt_array[66] != -1) {
      Alert_Guards(taunt_array[66]);
    }
    if (taunt_array[67] != -1) {
      Alert_Guards(taunt_array[67]);
    }
    if (taunt_array[68] != -1) {
      Alert_Guards(taunt_array[68]);
    }
    if (taunt_array[69] != -1) {
      Alert_Guards(taunt_array[69]);
    }
    if (taunt_array[70] != -1) {
      Alert_Guards(taunt_array[70]);
    }
    if (taunt_array[71] != -1) {
      Alert_Guards(taunt_array[71]);
    }
    if (taunt_array[72] != -1) {
      Alert_Guards(taunt_array[72]);
    }
    if (taunt_array[73] != -1) {
      Alert_Guards(taunt_array[73]);
    }
    if (taunt_array[74] != -1) {
      Alert_Guards(taunt_array[74]);
    }
    if (taunt_array[75] != -1) {
      Alert_Guards(taunt_array[75]);
    }
    if (taunt_array[76] != -1) {
      Alert_Guards(taunt_array[76]);
    }
    if (taunt_array[77] != -1) {
      Alert_Guards(taunt_array[77]);
    }
    if (taunt_array[78] != -1) {
      Alert_Guards(taunt_array[78]);
    }
    if (taunt_array[79] != -1) {
      Alert_Guards(taunt_array[79]);
    }
    if (taunt_array[80] != -1) {
      Alert_Guards(taunt_array[80]);
    }
    if (taunt_array[81] != -1) {
      Alert_Guards(taunt_array[81]);
    }
    if (taunt_array[82] != -1) {
      Alert_Guards(taunt_array[82]);
    }
    if (taunt_array[83] != -1) {
      Alert_Guards(taunt_array[83]);
    }
    if (taunt_array[84] != -1) {
      Alert_Guards(taunt_array[84]);
    }
    if (taunt_array[85] != -1) {
      Alert_Guards(taunt_array[85]);
    }
    if (taunt_array[86] != -1) {
      Alert_Guards(taunt_array[86]);
    }
    if (taunt_array[87] != -1) {
      Alert_Guards(taunt_array[87]);
    }
    if (taunt_array[88] != -1) {
      Alert_Guards(taunt_array[88]);
    }
    if (taunt_array[89] != -1) {
      Alert_Guards(taunt_array[89]);
    }
    if (taunt_array[90] != -1) {
      Alert_Guards(taunt_array[90]);
    }
    if (taunt_array[91] != -1) {
      Alert_Guards(taunt_array[91]);
    }
    if (taunt_array[92] != -1) {
      Alert_Guards(taunt_array[92]);
    }
    if (taunt_array[93] != -1) {
      Alert_Guards(taunt_array[93]);
    }
    if (taunt_array[94] != -1) {
      Alert_Guards(taunt_array[94]);
    }
    if (taunt_array[95] != -1) {
      Alert_Guards(taunt_array[95]);
    }
    if (taunt_array[96] != -1) {
      Alert_Guards(taunt_array[96]);
    }
    if (taunt_array[97] != -1) {
      Alert_Guards(taunt_array[97]);
    }
    if (taunt_array[98] != -1) {
      Alert_Guards(taunt_array[98]);
    }
    if (taunt_array[99] != -1) {
      Alert_Guards(taunt_array[99]);
    }
    if (taunt_array[100] != -1) {
      Alert_Guards(taunt_array[100]);
    }
    if (taunt_array[101] != -1) {
      Alert_Guards(taunt_array[101]);
    }
    if (taunt_array[102] != -1) {
      Alert_Guards(taunt_array[102]);
    }
    if (taunt_array[103] != -1) {
      Alert_Guards(taunt_array[103]);
    }
    if (taunt_array[104] != -1) {
      Alert_Guards(taunt_array[104]);
    }
    if (taunt_array[105] != -1) {
      Alert_Guards(taunt_array[105]);
    }
    if (taunt_array[106] != -1) {
      Alert_Guards(taunt_array[106]);
    }
    if (taunt_array[107] != -1) {
      Alert_Guards(taunt_array[107]);
    }
    if (taunt_array[108] != -1) {
      Alert_Guards(taunt_array[108]);
    }
    if (taunt_array[109] != -1) {
      Alert_Guards(taunt_array[109]);
    }
    if (taunt_array[110] != -1) {
      Alert_Guards(taunt_array[110]);
    }
    if (taunt_array[111] != -1) {
      Alert_Guards(taunt_array[111]);
    }
    if (taunt_array[112] != -1) {
      Alert_Guards(taunt_array[112]);
    }
    if (taunt_array[113] != -1) {
      Alert_Guards(taunt_array[113]);
    }
    if (taunt_array[114] != -1) {
      Alert_Guards(taunt_array[114]);
    }
    if (taunt_array[115] != -1) {
      Alert_Guards(taunt_array[115]);
    }
    if (taunt_array[116] != -1) {
      Alert_Guards(taunt_array[116]);
    }
    if (taunt_array[117] != -1) {
      Alert_Guards(taunt_array[117]);
    }
    if (taunt_array[118] != -1) {
      Alert_Guards(taunt_array[118]);
    }
    if (taunt_array[119] != -1) {
      Alert_Guards(taunt_array[119]);
    }
    if (taunt_array[120] != -1) {
      Alert_Guards(taunt_array[120]);
    }
    if (taunt_array[121] != -1) {
      Alert_Guards(taunt_array[121]);
    }
    if (taunt_array[122] != -1) {
      Alert_Guards(taunt_array[122]);
    }
    if (taunt_array[123] != -1) {
      Alert_Guards(taunt_array[123]);
    }
    if (taunt_array[124] != -1) {
      Alert_Guards(taunt_array[124]);
    }
    if (taunt_array[125] != -1) {
      Alert_Guards(taunt_array[125]);
    }
    if (taunt_array[126] != -1) {
      Alert_Guards(taunt_array[126]);
    }
    if (taunt_array[127] != -1) {
      Alert_Guards(taunt_array[127]);
    }
    if (taunt_array[128] != -1) {
      Alert_Guards(taunt_array[128]);
    }
    if (taunt_array[129] != -1) {
      Alert_Guards(taunt_array[129]);
    }
    if (taunt_array[130] != -1) {
      Alert_Guards(taunt_array[130]);
    }
    if (taunt_array[131] != -1) {
      Alert_Guards(taunt_array[131]);
    }
    if (taunt_array[132] != -1) {
      Alert_Guards(taunt_array[132]);
    }
    if (taunt_array[133] != -1) {
      Alert_Guards(taunt_array[133]);
    }
    if (taunt_array[134] != -1) {
      Alert_Guards(taunt_array[134]);
    }
    if (taunt_array[135] != -1) {
      Alert_Guards(taunt_array[135]);
    }
    if (taunt_array[136] != -1) {
      Alert_Guards(taunt_array[136]);
    }
    if (taunt_array[137] != -1) {
      Alert_Guards(taunt_array[137]);
    }
    if (taunt_array[138] != -1) {
      Alert_Guards(taunt_array[138]);
    }
    if (taunt_array[139] != -1) {
      Alert_Guards(taunt_array[139]);
    }
    if (taunt_array[140] != -1) {
      Alert_Guards(taunt_array[140]);
    }
    if (taunt_array[141] != -1) {
      Alert_Guards(taunt_array[141]);
    }
    if (taunt_array[142] != -1) {
      Alert_Guards(taunt_array[142]);
    }
    if (taunt_array[143] != -1) {
      Alert_Guards(taunt_array[143]);
    }
    if (taunt_array[144] != -1) {
      Alert_Guards(taunt_array[144]);
    }
    if (taunt_array[145] != -1) {
      Alert_Guards(taunt_array[145]);
    }
    if (taunt_array[146] != -1) {
      Alert_Guards(taunt_array[146]);
    }
    if (taunt_array[147] != -1) {
      Alert_Guards(taunt_array[147]);
    }
    if (taunt_array[148] != -1) {
      Alert_Guards(taunt_array[148]);
    }
    if (taunt_array[149] != -1) {
      Alert_Guards(taunt_array[149]);
    }
    if (taunt_array[150] != -1) {
      Alert_Guards(taunt_array[150]);
    }
    if (taunt_array[151] != -1) {
      Alert_Guards(taunt_array[151]);
    }
    if (taunt_array[152] != -1) {
      Alert_Guards(taunt_array[152]);
    }
    if (taunt_array[153] != -1) {
      Alert_Guards(taunt_array[153]);
    }
    if (taunt_array[154] != -1) {
      Alert_Guards(taunt_array[154]);
    }
    if (taunt_array[155] != -1) {
      Alert_Guards(taunt_array[155]);
    }
    if (taunt_array[156] != -1) {
      Alert_Guards(taunt_array[156]);
    }
    if (taunt_array[157] != -1) {
      Alert_Guards(taunt_array[157]);
    }
    if (taunt_array[158] != -1) {
      Alert_Guards(taunt_array[158]);
    }
    if (taunt_array[159] != -1) {
      Alert_Guards(taunt_array[159]);
    }
    if (taunt_array[160] != -1) {
      Alert_Guards(taunt_array[160]);
    }
    if (taunt_array[161] != -1) {
      Alert_Guards(taunt_array[161]);
    }
    if (taunt_array[162] != -1) {
      Alert_Guards(taunt_array[162]);
    }
    if (taunt_array[163] != -1) {
      Alert_Guards(taunt_array[163]);
    }
    if (taunt_array[164] != -1) {
      Alert_Guards(taunt_array[164]);
    }
    if (taunt_array[165] != -1) {
      Alert_Guards(taunt_array[165]);
    }
    if (taunt_array[166] != -1) {
      Alert_Guards(taunt_array[166]);
    }
    if (taunt_array[167] != -1) {
      Alert_Guards(taunt_array[167]);
    }
    if (taunt_array[168] != -1) {
      Alert_Guards(taunt_array[168]);
    }
    if (taunt_array[169] != -1) {
      Alert_Guards(taunt_array[169]);
    }
    if (taunt_array[170] != -1) {
      Alert_Guards(taunt_array[170]);
    }
    if (taunt_array[171] != -1) {
      Alert_Guards(taunt_array[171]);
    }
    if (taunt_array[172] != -1) {
      Alert_Guards(taunt_array[172]);
    }
    if (taunt_array[173] != -1) {
      Alert_Guards(taunt_array[173]);
    }
    if (taunt_array[174] != -1) {
      Alert_Guards(taunt_array[174]);
    }
    if (taunt_array[175] != -1) {
      Alert_Guards(taunt_array[175]);
    }
    if (taunt_array[176] != -1) {
      Alert_Guards(taunt_array[176]);
    }
    if (taunt_array[177] != -1) {
      Alert_Guards(taunt_array[177]);
    }
    if (taunt_array[178] != -1) {
      Alert_Guards(taunt_array[178]);
    }
    if (taunt_array[179] != -1) {
      Alert_Guards(taunt_array[179]);
    }
    if (taunt_array[180] != -1) {
      Alert_Guards(taunt_array[180]);
    }
    if (taunt_array[181] != -1) {
      Alert_Guards(taunt_array[181]);
    }
    if (taunt_array[182] != -1) {
      Alert_Guards(taunt_array[182]);
    }
    if (taunt_array[183] != -1) {
      Alert_Guards(taunt_array[183]);
    }
    if (taunt_array[184] != -1) {
      Alert_Guards(taunt_array[184]);
    }
    if (taunt_array[185] != -1) {
      Alert_Guards(taunt_array[185]);
    }
    if (taunt_array[186] != -1) {
      Alert_Guards(taunt_array[186]);
    }
    if (taunt_array[187] != -1) {
      Alert_Guards(taunt_array[187]);
    }
    if (taunt_array[188] != -1) {
      Alert_Guards(taunt_array[188]);
    }
    if (taunt_array[189] != -1) {
      Alert_Guards(taunt_array[189]);
    }
    if (taunt_array[190] != -1) {
      Alert_Guards(taunt_array[190]);
    }
    if (taunt_array[191] != -1) {
      Alert_Guards(taunt_array[191]);
    }
    if (taunt_array[192] != -1) {
      Alert_Guards(taunt_array[192]);
    }
    if (taunt_array[193] != -1) {
      Alert_Guards(taunt_array[193]);
    }
    if (taunt_array[194] != -1) {
      Alert_Guards(taunt_array[194]);
    }
    if (taunt_array[195] != -1) {
      Alert_Guards(taunt_array[195]);
    }
    if (taunt_array[196] != -1) {
      Alert_Guards(taunt_array[196]);
    }
    if (taunt_array[197] != -1) {
      Alert_Guards(taunt_array[197]);
    }
    if (taunt_array[198] != -1) {
      Alert_Guards(taunt_array[198]);
    }
    if (taunt_array[199] != -1) {
      Alert_Guards(taunt_array[199]);
    }
    if (taunt_array[200] != -1) {
      Alert_Guards(taunt_array[200]);
    }
    if (taunt_array[201] != -1) {
      Alert_Guards(taunt_array[201]);
    }
    if (taunt_array[202] != -1) {
      Alert_Guards(taunt_array[202]);
    }
    if (taunt_array[203] != -1) {
      Alert_Guards(taunt_array[203]);
    }
    if (taunt_array[204] != -1) {
      Alert_Guards(taunt_array[204]);
    }
    if (taunt_array[205] != -1) {
      Alert_Guards(taunt_array[205]);
    }
    if (taunt_array[206] != -1) {
      Alert_Guards(taunt_array[206]);
    }
    if (taunt_array[207] != -1) {
      Alert_Guards(taunt_array[207]);
    }
    if (taunt_array[208] != -1) {
      Alert_Guards(taunt_array[208]);
    }
    if (taunt_array[209] != -1) {
      Alert_Guards(taunt_array[209]);
    }
    if (taunt_array[210] != -1) {
      Alert_Guards(taunt_array[210]);
    }
    if (taunt_array[211] != -1) {
      Alert_Guards(taunt_array[211]);
    }
    if (taunt_array[212] != -1) {
      Alert_Guards(taunt_array[212]);
    }
    if (taunt_array[213] != -1) {
      Alert_Guards(taunt_array[213]);
    }
    if (taunt_array[214] != -1) {
      Alert_Guards(taunt_array[214]);
    }
    if (taunt_array[215] != -1) {
      Alert_Guards(taunt_array[215]);
    }
    if (taunt_array[216] != -1) {
      Alert_Guards(taunt_array[216]);
    }
    if (taunt_array[217] != -1) {
      Alert_Guards(taunt_array[217]);
    }
    if (taunt_array[218] != -1) {
      Alert_Guards(taunt_array[218]);
    }
    if (taunt_array[219] != -1) {
      Alert_Guards(taunt_array[219]);
    }
    if (taunt_array[220] != -1) {
      Alert_Guards(taunt_array[220]);
    }
    if (taunt_array[221] != -1) {
      Alert_Guards(taunt_array[221]);
    }
    if (taunt_array[222] != -1) {
      Alert_Guards(taunt_array[222]);
    }
    if (taunt_array[223] != -1) {
      Alert_Guards(taunt_array[223]);
    }
    if (taunt_array[224] != -1) {
      Alert_Guards(taunt_array[224]);
    }
    if (taunt_array[225] != -1) {
      Alert_Guards(taunt_array[225]);
    }
    if (taunt_array[226] != -1) {
      Alert_Guards(taunt_array[226]);
    }
    if (taunt_array[227] != -1) {
      Alert_Guards(taunt_array[227]);
    }
    if (taunt_array[0] != -1) {
      Alert_Guards(taunt_array[0]);
    }
    if (taunt_array[1] != -1) {
      Alert_Guards(taunt_array[1]);
    }
    if (taunt_array[2] != -1) {
      Alert_Guards(taunt_array[2]);
    }
    if (taunt_array[3] != -1) {
      Alert_Guards(taunt_array[3]);
    }
    if (taunt_array[4] != -1) {
      Alert_Guards(taunt_array[4]);
    }
    if (taunt_array[5] != -1) {
      Alert_Guards(taunt_array[5]);
    }
    if (taunt_array[6] != -1) {
      Alert_Guards(taunt_array[6]);
    }
    if (taunt_array[7] != -1) {
      Alert_Guards(taunt_array[7]);
    }
    if (taunt_array[8] != -1) {
      Alert_Guards(taunt_array[8]);
    }
    if (taunt_array[9] != -1) {
      Alert_Guards(taunt_array[9]);
    }
    if (taunt_array[10] != -1) {
      Alert_Guards(taunt_array[10]);
    }
    if (taunt_array[11] != -1) {
      Alert_Guards(taunt_array[11]);
    }
    if (taunt_array[12] != -1) {
      Alert_Guards(taunt_array[12]);
    }
    if (taunt_array[13] != -1) {
      Alert_Guards(taunt_array[13]);
    }
    if (taunt_array[14] != -1) {
      Alert_Guards(taunt_array[14]);
    }
    if (taunt_array[15] != -1) {
      Alert_Guards(taunt_array[15]);
    }
    if (taunt_array[16] != -1) {
      Alert_Guards(taunt_array[16]);
    }
    if (taunt_array[17] != -1) {
      Alert_Guards(taunt_array[17]);
    }
    if (taunt_array[18] != -1) {
      Alert_Guards(taunt_array[18]);
    }
    if (taunt_array[19] != -1) {
      Alert_Guards(taunt_array[19]);
    }
    if (taunt_array[20] != -1) {
      Alert_Guards(taunt_array[20]);
    }
    if (taunt_array[21] != -1) {
      Alert_Guards(taunt_array[21]);
    }
    if (taunt_array[22] != -1) {
      Alert_Guards(taunt_array[22]);
    }
    if (taunt_array[23] != -1) {
      Alert_Guards(taunt_array[23]);
    }
    if (taunt_array[24] != -1) {
      Alert_Guards(taunt_array[24]);
    }
    if (taunt_array[25] != -1) {
      Alert_Guards(taunt_array[25]);
    }
    if (taunt_array[26] != -1) {
      Alert_Guards(taunt_array[26]);
    }
    if (taunt_array[27] != -1) {
      Alert_Guards(taunt_array[27]);
    }
    if (taunt_array[28] != -1) {
      Alert_Guards(taunt_array[28]);
    }
    if (taunt_array[29] != -1) {
      Alert_Guards(taunt_array[29]);
    }
    if (taunt_array[30] != -1) {
      Alert_Guards(taunt_array[30]);
    }
    if (taunt_array[31] != -1) {
      Alert_Guards(taunt_array[31]);
    }
    if (taunt_array[32] != -1) {
      Alert_Guards(taunt_array[32]);
    }
    if (taunt_array[33] != -1) {
      Alert_Guards(taunt_array[33]);
    }
    if (taunt_array[34] != -1) {
      Alert_Guards(taunt_array[34]);
    }
    if (taunt_array[35] != -1) {
      Alert_Guards(taunt_array[35]);
    }
    if (taunt_array[36] != -1) {
      Alert_Guards(taunt_array[36]);
    }
    if (taunt_array[37] != -1) {
      Alert_Guards(taunt_array[37]);
    }
    if (taunt_array[38] != -1) {
      Alert_Guards(taunt_array[38]);
    }
    if (taunt_array[39] != -1) {
      Alert_Guards(taunt_array[39]);
    }
    if (taunt_array[40] != -1) {
      Alert_Guards(taunt_array[40]);
    }
    if (taunt_array[41] != -1) {
      Alert_Guards(taunt_array[41]);
    }
    if (taunt_array[42] != -1) {
      Alert_Guards(taunt_array[42]);
    }
    if (taunt_array[43] != -1) {
      Alert_Guards(taunt_array[43]);
    }
    if (taunt_array[44] != -1) {
      Alert_Guards(taunt_array[44]);
    }
    if (taunt_array[45] != -1) {
      Alert_Guards(taunt_array[45]);
    }
    if (taunt_array[46] != -1) {
      Alert_Guards(taunt_array[46]);
    }
    if (taunt_array[47] != -1) {
      Alert_Guards(taunt_array[47]);
    }
    if (taunt_array[48] != -1) {
      Alert_Guards(taunt_array[48]);
    }
    if (taunt_array[49] != -1) {
      Alert_Guards(taunt_array[49]);
    }
    if (taunt_array[50] != -1) {
      Alert_Guards(taunt_array[50]);
    }
    if (taunt_array[51] != -1) {
      Alert_Guards(taunt_array[51]);
    }
    if (taunt_array[52] != -1) {
      Alert_Guards(taunt_array[52]);
    }
    if (taunt_array[53] != -1) {
      Alert_Guards(taunt_array[53]);
    }
    if (taunt_array[54] != -1) {
      Alert_Guards(taunt_array[54]);
    }
    if (taunt_array[55] != -1) {
      Alert_Guards(taunt_array[55]);
    }
    if (taunt_array[56] != -1) {
      Alert_Guards(taunt_array[56]);
    }
    if (taunt_array[57] != -1) {
      Alert_Guards(taunt_array[57]);
    }
    if (taunt_array[58] != -1) {
      Alert_Guards(taunt_array[58]);
    }
    if (taunt_array[59] != -1) {
      Alert_Guards(taunt_array[59]);
    }
    if (taunt_array[60] != -1) {
      Alert_Guards(taunt_array[60]);
    }
    if (taunt_array[61] != -1) {
      Alert_Guards(taunt_array[61]);
    }
    if (taunt_array[62] != -1) {
      Alert_Guards(taunt_array[62]);
    }
    if (taunt_array[63] != -1) {
      Alert_Guards(taunt_array[63]);
    }
    if (taunt_array[64] != -1) {
      Alert_Guards(taunt_array[64]);
    }
    if (taunt_array[65] != -1) {
      Alert_Guards(taunt_array[65]);
    }
    if (taunt_array[66] != -1) {
      Alert_Guards(taunt_array[66]);
    }
    if (taunt_array[67] != -1) {
      Alert_Guards(taunt_array[67]);
    }
    if (taunt_array[68] != -1) {
      Alert_Guards(taunt_array[68]);
    }
    if (taunt_array[69] != -1) {
      Alert_Guards(taunt_array[69]);
    }
    if (taunt_array[70] != -1) {
      Alert_Guards(taunt_array[70]);
    }
    if (taunt_array[71] != -1) {
      Alert_Guards(taunt_array[71]);
    }
    if (taunt_array[72] != -1) {
      Alert_Guards(taunt_array[72]);
    }
    if (taunt_array[73] != -1) {
      Alert_Guards(taunt_array[73]);
    }
    if (taunt_array[74] != -1) {
      Alert_Guards(taunt_array[74]);
    }
    if (taunt_array[75] != -1) {
      Alert_Guards(taunt_array[75]);
    }
    if (taunt_array[76] != -1) {
      Alert_Guards(taunt_array[76]);
    }
    if (taunt_array[77] != -1) {
      Alert_Guards(taunt_array[77]);
    }
    if (taunt_array[78] != -1) {
      Alert_Guards(taunt_array[78]);
    }
    if (taunt_array[79] != -1) {
      Alert_Guards(taunt_array[79]);
    }
    if (taunt_array[80] != -1) {
      Alert_Guards(taunt_array[80]);
    }
    if (taunt_array[81] != -1) {
      Alert_Guards(taunt_array[81]);
    }
    if (taunt_array[82] != -1) {
      Alert_Guards(taunt_array[82]);
    }
    if (taunt_array[83] != -1) {
      Alert_Guards(taunt_array[83]);
    }
    if (taunt_array[84] != -1) {
      Alert_Guards(taunt_array[84]);
    }
    if (taunt_array[85] != -1) {
      Alert_Guards(taunt_array[85]);
    }
    if (taunt_array[86] != -1) {
      Alert_Guards(taunt_array[86]);
    }
    if (taunt_array[87] != -1) {
      Alert_Guards(taunt_array[87]);
    }
    if (taunt_array[88] != -1) {
      Alert_Guards(taunt_array[88]);
    }
    if (taunt_array[89] != -1) {
      Alert_Guards(taunt_array[89]);
    }
    if (taunt_array[90] != -1) {
      Alert_Guards(taunt_array[90]);
    }
    if (taunt_array[91] != -1) {
      Alert_Guards(taunt_array[91]);
    }
    if (taunt_array[92] != -1) {
      Alert_Guards(taunt_array[92]);
    }
    if (taunt_array[93] != -1) {
      Alert_Guards(taunt_array[93]);
    }
    if (taunt_array[94] != -1) {
      Alert_Guards(taunt_array[94]);
    }
    if (taunt_array[95] != -1) {
      Alert_Guards(taunt_array[95]);
    }
    if (taunt_array[96] != -1) {
      Alert_Guards(taunt_array[96]);
    }
    if (taunt_array[97] != -1) {
      Alert_Guards(taunt_array[97]);
    }
    if (taunt_array[98] != -1) {
      Alert_Guards(taunt_array[98]);
    }
    if (taunt_array[99] != -1) {
      Alert_Guards(taunt_array[99]);
    }
    if (taunt_array[100] != -1) {
      Alert_Guards(taunt_array[100]);
    }
    if (taunt_array[101] != -1) {
      Alert_Guards(taunt_array[101]);
    }
    if (taunt_array[102] != -1) {
      Alert_Guards(taunt_array[102]);
    }
    if (taunt_array[103] != -1) {
      Alert_Guards(taunt_array[103]);
    }
    if (taunt_array[104] != -1) {
      Alert_Guards(taunt_array[104]);
    }
    if (taunt_array[105] != -1) {
      Alert_Guards(taunt_array[105]);
    }
    if (taunt_array[106] != -1) {
      Alert_Guards(taunt_array[106]);
    }
    if (taunt_array[107] != -1) {
      Alert_Guards(taunt_array[107]);
    }
    if (taunt_array[108] != -1) {
      Alert_Guards(taunt_array[108]);
    }
    if (taunt_array[109] != -1) {
      Alert_Guards(taunt_array[109]);
    }
    if (taunt_array[110] != -1) {
      Alert_Guards(taunt_array[110]);
    }
    if (taunt_array[111] != -1) {
      Alert_Guards(taunt_array[111]);
    }
    if (taunt_array[112] != -1) {
      Alert_Guards(taunt_array[112]);
    }
    if (taunt_array[113] != -1) {
      Alert_Guards(taunt_array[113]);
    }
    if (taunt_array[114] != -1) {
      Alert_Guards(taunt_array[114]);
    }
    if (taunt_array[115] != -1) {
      Alert_Guards(taunt_array[115]);
    }
    if (taunt_array[116] != -1) {
      Alert_Guards(taunt_array[116]);
    }
    if (taunt_array[117] != -1) {
      Alert_Guards(taunt_array[117]);
    }
    if (taunt_array[118] != -1) {
      Alert_Guards(taunt_array[118]);
    }
    if (taunt_array[119] != -1) {
      Alert_Guards(taunt_array[119]);
    }
    if (taunt_array[120] != -1) {
      Alert_Guards(taunt_array[120]);
    }
    if (taunt_array[121] != -1) {
      Alert_Guards(taunt_array[121]);
    }
    if (taunt_array[122] != -1) {
      Alert_Guards(taunt_array[122]);
    }
    if (taunt_array[123] != -1) {
      Alert_Guards(taunt_array[123]);
    }
    if (taunt_array[124] != -1) {
      Alert_Guards(taunt_array[124]);
    }
    if (taunt_array[125] != -1) {
      Alert_Guards(taunt_array[125]);
    }
    if (taunt_array[126] != -1) {
      Alert_Guards(taunt_array[126]);
    }
    if (taunt_array[127] != -1) {
      Alert_Guards(taunt_array[127]);
    }
    if (taunt_array[128] != -1) {
      Alert_Guards(taunt_array[128]);
    }
    if (taunt_array[129] != -1) {
      Alert_Guards(taunt_array[129]);
    }
    if (taunt_array[130] != -1) {
      Alert_Guards(taunt_array[130]);
    }
    if (taunt_array[131] != -1) {
      Alert_Guards(taunt_array[131]);
    }
    if (taunt_array[132] != -1) {
      Alert_Guards(taunt_array[132]);
    }
    if (taunt_array[133] != -1) {
      Alert_Guards(taunt_array[133]);
    }
    if (taunt_array[134] != -1) {
      Alert_Guards(taunt_array[134]);
    }
    if (taunt_array[135] != -1) {
      Alert_Guards(taunt_array[135]);
    }
    if (taunt_array[136] != -1) {
      Alert_Guards(taunt_array[136]);
    }
    if (taunt_array[137] != -1) {
      Alert_Guards(taunt_array[137]);
    }
    if (taunt_array[138] != -1) {
      Alert_Guards(taunt_array[138]);
    }
    if (taunt_array[139] != -1) {
      Alert_Guards(taunt_array[139]);
    }
    if (taunt_array[140] != -1) {
      Alert_Guards(taunt_array[140]);
    }
    if (taunt_array[141] != -1) {
      Alert_Guards(taunt_array[141]);
    }
    if (taunt_array[142] != -1) {
      Alert_Guards(taunt_array[142]);
    }
    if (taunt_array[143] != -1) {
      Alert_Guards(taunt_array[143]);
    }
    if (taunt_array[144] != -1) {
      Alert_Guards(taunt_array[144]);
    }
    if (taunt_array[145] != -1) {
      Alert_Guards(taunt_array[145]);
    }
    if (taunt_array[146] != -1) {
      Alert_Guards(taunt_array[146]);
    }
    if (taunt_array[147] != -1) {
      Alert_Guards(taunt_array[147]);
    }
    if (taunt_array[148] != -1) {
      Alert_Guards(taunt_array[148]);
    }
    if (taunt_array[149] != -1) {
      Alert_Guards(taunt_array[149]);
    }
    if (taunt_array[150] != -1) {
      Alert_Guards(taunt_array[150]);
    }
    if (taunt_array[151] != -1) {
      Alert_Guards(taunt_array[151]);
    }
    if (taunt_array[152] != -1) {
      Alert_Guards(taunt_array[152]);
    }
    if (taunt_array[153] != -1) {
      Alert_Guards(taunt_array[153]);
    }
    if (taunt_array[154] != -1) {
      Alert_Guards(taunt_array[154]);
    }
    if (taunt_array[155] != -1) {
      Alert_Guards(taunt_array[155]);
    }
    if (taunt_array[156] != -1) {
      Alert_Guards(taunt_array[156]);
    }
    if (taunt_array[157] != -1) {
      Alert_Guards(taunt_array[157]);
    }
    if (taunt_array[158] != -1) {
      Alert_Guards(taunt_array[158]);
    }
    if (taunt_array[159] != -1) {
      Alert_Guards(taunt_array[159]);
    }
    if (taunt_array[160] != -1) {
      Alert_Guards(taunt_array[160]);
    }
    if (taunt_array[161] != -1) {
      Alert_Guards(taunt_array[161]);
    }
    if (taunt_array[162] != -1) {
      Alert_Guards(taunt_array[162]);
    }
    if (taunt_array[163] != -1) {
      Alert_Guards(taunt_array[163]);
    }
    if (taunt_array[164] != -1) {
      Alert_Guards(taunt_array[164]);
    }
    if (taunt_array[165] != -1) {
      Alert_Guards(taunt_array[165]);
    }
    if (taunt_array[166] != -1) {
      Alert_Guards(taunt_array[166]);
    }
    if (taunt_array[167] != -1) {
      Alert_Guards(taunt_array[167]);
    }
    if (taunt_array[168] != -1) {
      Alert_Guards(taunt_array[168]);
    }
    if (taunt_array[169] != -1) {
      Alert_Guards(taunt_array[169]);
    }
    if (taunt_array[170] != -1) {
      Alert_Guards(taunt_array[170]);
    }
    if (taunt_array[171] != -1) {
      Alert_Guards(taunt_array[171]);
    }
    if (taunt_array[172] != -1) {
      Alert_Guards(taunt_array[172]);
    }
    if (taunt_array[173] != -1) {
      Alert_Guards(taunt_array[173]);
    }
    if (taunt_array[174] != -1) {
      Alert_Guards(taunt_array[174]);
    }
    if (taunt_array[175] != -1) {
      Alert_Guards(taunt_array[175]);
    }
    if (taunt_array[176] != -1) {
      Alert_Guards(taunt_array[176]);
    }
    if (taunt_array[177] != -1) {
      Alert_Guards(taunt_array[177]);
    }
    if (taunt_array[178] != -1) {
      Alert_Guards(taunt_array[178]);
    }
    if (taunt_array[179] != -1) {
      Alert_Guards(taunt_array[179]);
    }
    if (taunt_array[180] != -1) {
      Alert_Guards(taunt_array[180]);
    }
    if (taunt_array[181] != -1) {
      Alert_Guards(taunt_array[181]);
    }
    if (taunt_array[182] != -1) {
      Alert_Guards(taunt_array[182]);
    }
    if (taunt_array[183] != -1) {
      Alert_Guards(taunt_array[183]);
    }
    if (taunt_array[184] != -1) {
      Alert_Guards(taunt_array[184]);
    }
    if (taunt_array[185] != -1) {
      Alert_Guards(taunt_array[185]);
    }
    if (taunt_array[186] != -1) {
      Alert_Guards(taunt_array[186]);
    }
    if (taunt_array[187] != -1) {
      Alert_Guards(taunt_array[187]);
    }
    if (taunt_array[188] != -1) {
      Alert_Guards(taunt_array[188]);
    }
    if (taunt_array[189] != -1) {
      Alert_Guards(taunt_array[189]);
    }
    if (taunt_array[190] != -1) {
      Alert_Guards(taunt_array[190]);
    }
    if (taunt_array[191] != -1) {
      Alert_Guards(taunt_array[191]);
    }
    if (taunt_array[192] != -1) {
      Alert_Guards(taunt_array[192]);
    }
    if (taunt_array[193] != -1) {
      Alert_Guards(taunt_array[193]);
    }
    if (taunt_array[194] != -1) {
      Alert_Guards(taunt_array[194]);
    }
    if (taunt_array[195] != -1) {
      Alert_Guards(taunt_array[195]);
    }
    if (taunt_array[196] != -1) {
      Alert_Guards(taunt_array[196]);
    }
    if (taunt_array[197] != -1) {
      Alert_Guards(taunt_array[197]);
    }
    if (taunt_array[198] != -1) {
      Alert_Guards(taunt_array[198]);
    }
    if (taunt_array[199] != -1) {
      Alert_Guards(taunt_array[199]);
    }
    if (taunt_array[200] != -1) {
      Alert_Guards(taunt_array[200]);
    }
    if (taunt_array[201] != -1) {
      Alert_Guards(taunt_array[201]);
    }
    if (taunt_array[202] != -1) {
      Alert_Guards(taunt_array[202]);
    }
    if (taunt_array[203] != -1) {
      Alert_Guards(taunt_array[203]);
    }
    if (taunt_array[204] != -1) {
      Alert_Guards(taunt_array[204]);
    }
    if (taunt_array[205] != -1) {
      Alert_Guards(taunt_array[205]);
    }
    if (taunt_array[206] != -1) {
      Alert_Guards(taunt_array[206]);
    }
    if (taunt_array[207] != -1) {
      Alert_Guards(taunt_array[207]);
    }
    if (taunt_array[208] != -1) {
      Alert_Guards(taunt_array[208]);
    }
    if (taunt_array[209] != -1) {
      Alert_Guards(taunt_array[209]);
    }
    if (taunt_array[210] != -1) {
      Alert_Guards(taunt_array[210]);
    }
    if (taunt_array[211] != -1) {
      Alert_Guards(taunt_array[211]);
    }
    if (taunt_array[212] != -1) {
      Alert_Guards(taunt_array[212]);
    }
    if (taunt_array[213] != -1) {
      Alert_Guards(taunt_array[213]);
    }
    if (taunt_array[214] != -1) {
      Alert_Guards(taunt_array[214]);
    }
    if (taunt_array[215] != -1) {
      Alert_Guards(taunt_array[215]);
    }
    if (taunt_array[216] != -1) {
      Alert_Guards(taunt_array[216]);
    }
    if (taunt_array[217] != -1) {
      Alert_Guards(taunt_array[217]);
    }
    if (taunt_array[218] != -1) {
      Alert_Guards(taunt_array[218]);
    }
    if (taunt_array[219] != -1) {
      Alert_Guards(taunt_array[219]);
    }
    if (taunt_array[220] != -1) {
      Alert_Guards(taunt_array[220]);
    }
    if (taunt_array[221] != -1) {
      Alert_Guards(taunt_array[221]);
    }
    if (taunt_array[222] != -1) {
      Alert_Guards(taunt_array[222]);
    }
    if (taunt_array[223] != -1) {
      Alert_Guards(taunt_array[223]);
    }
    if (taunt_array[224] != -1) {
      Alert_Guards(taunt_array[224]);
    }
    if (taunt_array[225] != -1) {
      Alert_Guards(taunt_array[225]);
    }
    if (taunt_array[226] != -1) {
      Alert_Guards(taunt_array[226]);
    }
    if (taunt_array[227] != -1) {
      Alert_Guards(taunt_array[227]);
    }
  }

  // Align pointers as follows:
  //    Cores 0/1: Write to opponents' data segment
  //    Cores 2/3: Write to home data segment
  unsigned int *ptr;
  ptr = HOME_DATA_SEGMENT;
  if (core_id == 0 || core_id == 1) {
    ptr = OPPONENT_DATA_SEGMENT;
  }
  ptr += (core_id % 4) * (64);

  // Write words rather than bytes
  unsigned int pbyte = (unsigned int) payload;
  unsigned int pword = pbyte | pbyte << 8 | pbyte << 16 | pbyte << 24;

  // Set up while loop
  while(1) {

    // Cores 0/1 write to opponents' data segment
    if (core_id == 0 || core_id == 1) {
      Sneak_Attack();
    }

    ptr[0] = pword;

    // Prefetch cache line
    prefetch(ptr+128);

    // Write payload to cache
    ptr[1] = pword; ptr[2] = pword; ptr[3] = pword; ptr[4] = pword;
    ptr[5] = pword; ptr[6] = pword; ptr[7] = pword; ptr[8] = pword;
    ptr[9] = pword; ptr[10] = pword; ptr[11] = pword; ptr[12] = pword;
    ptr[13] = pword; ptr[14] = pword; ptr[15] = pword; ptr[16] = pword;
    ptr[17] = pword; ptr[18] = pword; ptr[19] = pword; ptr[20] = pword;
    ptr[21] = pword; ptr[22] = pword; ptr[23] = pword; ptr[24] = pword;
    ptr[25] = pword; ptr[26] = pword; ptr[27] = pword; ptr[28] = pword;
    ptr[29] = pword; ptr[30] = pword; ptr[31] = pword; ptr[32] = pword;
    ptr[33] = pword; ptr[34] = pword; ptr[35] = pword; ptr[36] = pword;
    ptr[37] = pword; ptr[38] = pword; ptr[39] = pword; ptr[40] = pword;
    ptr[41] = pword; ptr[42] = pword; ptr[43] = pword; ptr[44] = pword;
    ptr[45] = pword; ptr[46] = pword; ptr[47] = pword; ptr[48] = pword;
    ptr[49] = pword; ptr[50] = pword; ptr[51] = pword; ptr[52] = pword;
    ptr[53] = pword; ptr[54] = pword; ptr[55] = pword; ptr[56] = pword;
    ptr[57] = pword; ptr[58] = pword; ptr[59] = pword; ptr[60] = pword;
    ptr[61] = pword; ptr[62] = pword; ptr[63] = pword;

    // Advance pointer & prefetch
    ptr += 128;
    prefetch(ptr+128);

    // Retreat to avoid detection after each cycle
    if (core_id == 0 || core_id == 1) {
      retreat();
    }
  }
}