//常量设置
var Const=
{
	balkStr:"*",	//障碍字符
	enptyStr:"-"	//空闲字符
};

//常用的方法
var Number=
{
	max:function(a,b)
	{
		return a>b?a:b;
	},
	min:function(a,b)
	{
		return a<b?a:b;
	},
	random:function(min,max)
	{
		return Math.floor(Math.random()*(max-min+1))+min;
	}
}
Array.prototype.RemoveAt=function(num)
{
	if(num<0)	return this;
	return this.slice(0,num).concat(this.slice(num+1,this.length));
}
String.prototype.Trim=function(str)
{
	var tmpStr="(?:"+(str||" ")+")";
	var reg=new RegExp("(?:^"+tmpStr+"+|"+tmpStr+"+$)","g");
	return this.replace(reg,"");
}
//取反,如果为-则改成*,如果为*则改成-
String.prototype.setChar=function(n)
{
	var c=this.charAt(n).reverse();
	return this.substring(0,n)+c+this.substr(n+1);
}
String.prototype.reverse=function()
{
	return this==Const.enptyStr?Const.balkStr:Const.enptyStr;
}
var IE=navigator.appName=="Microsoft Internet Explorer";	//是否是IE