generate n*n board