Code covered by the BSD License  

Highlights from
BattleShip (R)

image thumbnail

BattleShip (R)

by

 

23 Oct 2008 (Updated )

Learn and have fun with an old classic.

soundOff(hObject,eventdata)
function soundOff(hObject,eventdata)
%  	Author: Isaac Noh
%   Copyright 2008-2009 The MathWorks, Inc.
%   Version: 1.1

val = get(hObject,'Checked');

if strcmp(val,'on')
    % Set marker to turn off sound
    set(hObject,'Checked','off');
else
    % Set marker to turn sound back on
    set(hObject,'Checked','on')
end

Contact us