Final

Concept

One day,the blue ninja turtle encounter his enemy 一 yellow monster.

He must to defect this monster then he can go forward.

But this yellow monster is very strong , only one person can't defect him.

So the blue ninja turtle decide to convince his friends to join this battle.

Picture

main-character


Blue ninja turtle

Enemy


Yellow monster

Friend


Red ninja turtle

Friend


Orange ninja turtle

Friend


Purple ninja turtle

If you win, you will see these pictures.

If you lose, you will see these pictures.

If you want to keep going this battle, you can try again.

Code

a=0; %3種情況

y=0;

flag = 0;

FS = 40000;

fs=FS;

T=1/fs;

clear sound

[y,fs]=audioread('song.mp3');

soundsc(y,fs);

photo=imshow('theme.jpg');

pause(5);


while (flag == 0)

clear m;

m = mobiledev;

photo=imshow('main.jpg');

pause(3);

m.logging = 1;

pause(5);

m.logging = 0;

[o,~] = orientlog(m);

SensorYaxis = o(:,3);

SensorYaxis = mean(SensorYaxis);

SensorYaxis = fix(SensorYaxis);


load_system('ggininder');

sim('ggininder');

y=max(a);

if y == 1

photo=imshow('two.jpg');

pause(3);

photo=imshow('ko.jpg');

pause(3);

photo=imshow('gg.jpg');

pause(3);

else if y == 2

photo=imshow('one.jpg');

pause(3);

photo=imshow('win1.jpg');

pause(3);

photo=imshow('winner.jpg');

pause(3);

else if y == 3

photo=imshow('three.jpg');

pause(3);

photo=imshow('ko.jpg');

pause(3);

photo=imshow('gg.jpg');

pause(3);

end

end


end

photo=imshow('yesorno.jpg');

pause(3);

m.logging = 1;

pause(5);

m.logging = 0;

clear o

clear SensorYaxis

[o,~] = orientlog(m);

SensorYaxis = o(:,3);

SensorYaxis = mean(SensorYaxis);

SensorYaxis = fix(SensorYaxis);

if(SensorYaxis<-70 && SensorYaxis>-110)

flag = 0;

end

if(SensorYaxis<110 && SensorYaxis>70)

flag = 1;

break;

end

end

photo=imshow('byebye.jpg');

pause(3);

clear sound;

Video