function twentyfourgame(arg1)
% 本人学习 Matalb GUI编程的一个实例
% 本人邮箱:slqinyi@http://www.doczj.com/doc/af9f091e59eef8c75fbfb3fb.html,欢迎共同学习
% 程序中的图片可以换成是自己的图片
% 图片的文件命名规则如下:方片1~10 为 1~10.jpg
% 梅花1~10 为 11~20.jpg
% 红心1~10 为 21~30.jpg
% 黑桃1~10 为 31~40.jpg
% twentyfour函数中有很多的disp 语句,如果不喜欢,可以注释掉。
% 本程序最后修改时间:2011年3月25日,无版权,欢迎以各种渠道传播
% clf
if nargin < 1
arg1 = 'newgame';
end
if strcmp(arg1, 'newgame')
clf
% set(gcf,'resize','off'); % 禁止调整窗口的大小
set(gcf,'name','算24点 Version 1.0') % 修改标题栏
set(gcf,'numbertitle','off') % 去掉标题栏中的 figure 1
h_pai1 = uicontrol(gcf,'style','edit',...
'unit','normalized','position',[0.1,0.58,0.18,0.3],...
'BackgroundColor',[1,1,1],'ForegroundColor',[0 0 0],...
'fontsize',44,'fontname','times new roman','tag','t_pai1','visible','off');
h_pai2 = uicontrol(gcf,'style','edit',...
'unit','normalized','position',[0.3,0.58,0.18,0.3],...
'BackgroundColor',[1,1,1],'ForegroundColor',[0 0 0],...
'fontsize',44,'fontname','times new roman','tag','t_pai2','visible','off');
h_pai3 = uicontrol(gcf,'style','edit',...
'unit','normalized','position',[0.5,0.58,0.18,0.3],...
'BackgroundColor',[1,1,1],'ForegroundColor',[0 0 0],...
'fontsize',44,'fontname','times new roman','tag','t_pai3','visible','off');
h_pai4 = uicontrol(gcf,'style','edit',...
'unit','normalized','position',[0.7,0.58,0.18,0.3],...
'BackgroundColor',[1,1,1],'ForegroundColor',[0 0 0],...
'fontsize',44,'fontname','times new roman','tag','t_pai4','visible','off');
h_suru = uicontrol(gcf,'style','edit',...
'unit','normalized','position',[0.2,0.225,0.5,0.13],...
'BackgroundColor',[1,1,1],'ForegroundColor',[0 0 0],...
'fontsize',20,'fontname','times new roman','tag','t_suru');
h_daan = uicontrol(gcf,'style','edit',...
'unit','normalized','position',[0.2,0.055,0.5,0.13],...
'BackgroundColor',[1,1,1],'ForegroundColor',[0 0 0],...
'fontsize',20,'fontname','times new roman','tag','t_daan');
h_xing = uicontrol(gcf,'style','pushbutton',...
'unit','normalized','position',[0.74,0.255,0.17,0.1],...
'BackgroundColor',[1,1,1],'ForegroundColor',[0 0 1],...
'fontsize',10,'string','NewGame','callback','twentyfourgame(''newgame'')','tag','t_xing');
h_tiji = uicontrol(gcf,'style','pushbutton',...
'unit','normalized','position',[0.74,0.15,0.17,0.1],...
'BackgroundColor',[1,1,1],'ForegroundColor',[0 0 1],...
'fontsize',10,'string','Submit','callback','twentyfourgame(''submit'')','tag'