I am making a tic tac toe game and can't figure out the correct order to get alternating buttons. This is the callback for my pushbutton uicontrol
function ex_ttt_update2( handle, event )
persistent var
if (var=='x')
var='O';
elseif (var=='X')
var='X';
else
var='X';
set (handle,'string',var)
end
Aucun commentaire:
Enregistrer un commentaire