private void choiceMoveDir()  //ӶܷѡϺõ
	{
		if(toMoveWays.size()==1) //ֻһܷ
		{
			avoidAttack=true;
			toMoveWay=toMoveWays.get(0);
			avoidStep=toMoveWay.length-1;
			return ;
		}
		
		//жܷ
		int endx,endy;
		TANK_DIR[] tempWay;
		for(int i=0;i<toMoveWays.size();i++)
		{
			endx=this.x;
			endy=this.y;
			tempWay=toMoveWays.get(i);
			for(int j=tempWay.length-1;j>=0;j--)  //㰴tempDirƶԶ
			{
				switch(tempWay[j])
				{
					case U:
					{ 
						if(Math.abs(endy-10-y)>Math.abs(endy-y)) //ԶTankԭƶ
						{ endy-=10; } }break;
					case D:{ if(Math.abs(endy+10-y)>Math.abs(endy-y)) { endy+=10; } }break;
					case L:{ if(Math.abs(endx-10-x)>Math.abs(endx-x)) { endx-=10; } }break;
					case R:{ if(Math.abs(endx+10-x)>Math.abs(endx-x)) { endx+=10; } }break;
					default:break;
				}
			}
			
			if(!isHitWall(new Rectangle(endx-20,endy-20,40,40))) //ԶǷײǽ
			{
				toMoveWay=tempWay;
				avoidAttack=true; //ܹ
				avoidStep=tempWay.length-1; //ƶ
				return;
			}
		}
		
		avoidAttack=false; //List,ûкõķ,
	}