image thumbnail

MOO Breaker

by

 

A variant of classical "MOO" or "Cows n Bulls" game.

board(handy,varargin)
function board(handy,varargin)

global ghands Guess moonum;

ii=varargin{2};

switch Guess(ii),
	case '1',  numby=1;
	case '2',  numby=2;
	case '3',  numby=3;
	case '4',  numby=4;
	case '5',  numby=5;
	case '6',  numby=6;    
	case '7',  numby=7;
	case '8',  numby=8;
	case '9',  numby=9;
	case '0',  numby=0;
end
    
Guess(ii)=int2str(mod(1+numby,10));
cdata=imread([Guess(ii),'.tif']);
set(ghands(ii),'cdata',cdata);

if moonum==Guess, 
    msg={'You Cracked it...!'};
    [braindata brainmap]=imread('brain.jpg');
    msg_handle=msgbox(msg,'Gotcha!!!...','custom',braindata,brainmap);                        
    pause(1);
    close(msg_handle);
end

Contact us