Re: Weird error situation
Re: Weird error situation
- Subject: Re: Weird error situation
- From: Laurence Harris <email@hidden>
- Date: Mon, 24 Sep 2007 01:23:24 -0400
On Sep 24, 2007, at 12:57 AM, Adam wrote:
Here's the code:
bool collision_check()
{
//if something's in the way return false otherwise return true
}
bool tile_down()
{
next_piece = curr_piece;
next_piece.y--;
if (!collision_check())
{
return false;
}else
{
return true;
}
}
If collision_check returns false then tile_down should also return
false! ... right?
Given the definition of collision_check above, exactly when do you
expect it to return false? Since you don't actually return anything
from collision_check() it always returns true, so tile_down() will also.
What does any of this have to do with Xcode? This is really basic C
programming that has nothing to do with the use of Xcode. This list
is for questions related to the use of Xcode and related tools, not
general programming questions for people who happen to be using
Xcode. There are lots of other mailing lists and news groups for
beginning programmers to ask these kinds of questions.
Larry
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden