📄 create_sudoku.m
字号:
function create_sudoku(handles)
t=timer('timerfcn','waitbar(mod(etime(clock,t0)/60,1),hwb)','period',1 ...
,'startfcn','hwb=waitbar(0,''请稍候......'',''windowstyle'',''modal'');t0=clock;' ...
,'stopfcn','delete(hwb)','executionmode','fixedrate');
start(t);
n=get(handles.create_slider,'value');
[s,ss]=sudoku_construct(n);
h_text=getappdata(handles.sudoku,'h_text');
for i=1:9,
for j=1:9,
ix=sub2ind([9 9],i,j);
if s(ix)==0,
str='';
else
str=num2str(s(ix));
end
set(h_text(ix),'string',str,'color','black');
end
end
stop(t);
delete(t);
setappdata(handles.sudoku,'s',s);
setappdata(handles.sudoku,'s0',s);
setappdata(handles.sudoku,'ss',ss);
setappdata(handles.sudoku,'t0',clock);
setappdata(handles.sudoku,'cheated',0);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -