数独游戏,protectedbooleansetTileIfValid(intx,inty,intvalue){inttiles[]=getUsedTiles(x,y);if(value!=0){for(inttile:tiles){if(tile==value){returnfalse;}}}setTile(x,y,value);fromshu();returntrue;}protectedint[]getUsedTiles(intx,inty){returnusershu[x][y];}privatevoi