int numConnected(Piece p, int x, int y, boolean[][] board){
		if(x<0 || x>=board.length || y<0 || y>=board[0].length || !board[x][y])
			return 0;
		board[x][y] = false;
		int[] nums = {
				numConnected(p,x+1,y,board),
				numConnected(p,x-1,y,board),
				numConnected(p,x,y+1,board),
				numConnected(p,x,y-1,board),
				numConnected(p,x-1,y-1,board),
				numConnected(p,x+1,y+1,board),
				numConnected(p,x+1,y-1,board),
				numConnected(p,x-1,y+1,board)
				};
		int sum = 1;
		for(int i : nums)
			sum+=i;
		return sum;
	}