board()
	{
		try
		{
			pw=new PrintWriter(new BufferedWriter(new FileWriter("log.txt")),true);
		}
		catch(Exception e)
		{
		}
		p=new int[128];
		c=new int[128];
		pl=new int[2][16];
		pll=new int[2];
		ms=new move[32*MAXPLY];
		msi=new int[MAXPLY];
		ss=new int[32*MAXPLY];
		pv=new move[MAXPLY][MAXPLY];
		pvl=new int[MAXPLY];
		kill=new move[MAXPLY][2];
		hist=new int[64][64];
		eval=new int[MAXPLY];
		hmv=new move[MAXHPLY];
		hf=new int[MAXHPLY];
		hcst=new int[MAXHPLY];
		hep=new int[MAXHPLY];
		atk=new int[256];
		step=new int[256];
		//hard-coded pawn attacks
		atk[15+128]|=pm[1][1];
		atk[17+128]|=pm[1][1];
		atk[-15+128]|=pm[2][1];
		atk[-17+128]|=pm[2][1];
		for(int pc=2;pc<=6;pc++)
		{
			for(int x=0;dt[pc][x]!=0;x++)
			{
				int sq=dt[pc][x];
				for(int y=0;y<8&&sq>=-128&&sq<128;y++)
				{
					atk[sq+128]|=pm[1][pc];
					step[sq+128]=dt[pc][x];
					if(!sl[pc])
						break;
					sq+=dt[pc][x];
				}
			}
		}
		beep=0;//7;
		md=4;
		cs=2;
		newgame();
	}