Answer to Question #31178 in C++ for ali hamza

Question #31178
From GC ALI HAMZA CHEEMA
i am having problem while making this game similar to rapid roll it is a basic concept what i want is at the end of this code where an the logic of detecting the space by the ball to fall down when it reaches an empty space is written here is my code move the ball my pressing a and d the code is written in visual studio 10 c++ file.there is a lot of problem in the end where if statement is written that i==5 etc kindly help me correcting this..
if(i==5||(i==7)||(i==9)||(i==11)||(i==13)||(i==15)||(i==17))
{

if(arr[num]==1 && 0<h && h<=5)

{ {
Sleep(33);

search=getch();
if (search=='a' && h>1 )
{ h--;
}
else if(search=='d' &&h<21 )
{ h++;
}num++;}
}

else if (arr[num]==0 && 0<=h && h<=5)
{
Sleep(127);
i++;
num++;
if(n==18)
n=0;}

i
0
Expert's answer

Answer in progress...

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
APPROVED BY CLIENTS