boolean result()
	{
		gen(0);
		checklegal(0);
		if(msi[1]==0)
		{
			println(incheck()?"mate":"stalemate");
			return true;
		}
		if(f==100)
		{
			println("draw by fifty moves");
			return true;
		}
		return false;
	}