我建立了一个数独网格,创建了一个多维数组。我尝试实现的一个逻辑是检查九个中心周围的数字。
var grid = [
[1,4,2,8,0,6,7,9,5],
[8,0,0,0,9,1,0,7,1],
[4,9,0,2,5,2,0,0,0],
[9,0,2,9,1,2,0,0,0],
[0,5,8,8,5,3,9,0,0],
[3,1,0,7,6,4,0,2,0],
[2,3,0,1,5,8,7,9,4],
[7,8,0,0,7,5,4,0,0],
[6,0,7,4,3,7,0,0,9],
];
我的数独网格的中心如下:
var gridCenters =