The game is just like Tetris, only there are no blocks, instead we are matching them to trash bins.
the individual words, I understand.
the sentence, makes my brain hurt.
jephthah
Posting Maven
2,587 posts since Feb 2008
Reputation Points: 2,143
Solved Threads: 179
> The problem is, the professor only taught us the basics of C programming, the functions, switch statements and whatnot
That's not the only problem.
First it was a half-assed job of teaching you at all,
Then another half-assed job in teaching you obsolete TurboC as well - sheesh.
> Any suggestions ?
Pencil and paper.
Make a list of the things you need to do.
Think about how you would write the code.
Make little test programs to test your ideas. If that seems too complicated, then break the problem down into smaller steps.
When you've got a pretty good idea about how all the little bits work individually, think about how they might talk to one another (parameters, results etc), and start building up a program in stages.
Test regularly, and when you have reached a stage where an intermediate program does something useful, save a copy of it.
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
Well one of your gotoxy is at the very least a compiler warning, if not an outright error.
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953
You have a label and a variable with the same name.
You have a LABEL (and the goto that goes with it)
Your goto is a backward jump
Your goto is INTO the middle of a loop.
First you need to learn some elements of basic program construction. Bashing in random snippets, compiling them and then asking on a forum "what's wrong now" won't get it done.
FWIW
int x = pickRandom(0, 79);
int y = 0;
do {
gotoxy(x,y);
printf("T");
delay(200);
printf("\b ");
y = y + 1;
} while ( y < 24 );
Salem
Posting Sage
11,531 posts since Dec 2005
Reputation Points: 5,862
Solved Threads: 953