| Author |
Message |
Tony

|
Posted: Sun Nov 08, 2009 6:38 pm Post subject: RE:Problem with manual collision checking |
|
|
Could you post the answers though?
Then also to the original question of
Tony @ Sat Nov 07, 2009 2:38 pm wrote: For what value of boxx will this be true?
| code: |
if maxx-40 > boxx and maxx-20 < boxx + 20
|
|
Tony's programming blog. DWITE - a programming contest. |
|
|
|
 |
Sponsor Sponsor

|
|
 |
ReCreate

|
Posted: Sun Nov 08, 2009 7:07 pm Post subject: RE:Problem with manual collision checking |
|
|
Erm... All I did is copy and example and put in my own variables for it
Anyways
a) 0 < x and x < 4
b) 1 < x and x < 3
c) 2 < x and x < 2
a) anything larger than 0 and anything smaller than 4
b)anything larger than 1 and anything smaller than 3
c)anything larger that 2 and smaller that 2 (which is nothing if it is put together)
Am I right? |
|
|
|
|
 |
Tony

|
Posted: Sun Nov 08, 2009 7:29 pm Post subject: RE:Problem with manual collision checking |
|
|
| Right so far. Now using the same approach, what values (if any) work for the boxx question above? |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
 |
ReCreate

|
Posted: Sun Nov 08, 2009 9:20 pm Post subject: RE:Problem with manual collision checking |
|
|
| anything smaller than maxx-40 and anything larger than maxx-20? |
|
|
|
|
 |
Tony

|
|
|
|
 |
ReCreate

|
Posted: Sun Nov 08, 2009 10:06 pm Post subject: RE:Problem with manual collision checking |
|
|
| No? Then what? |
|
|
|
|
 |
Tony

|
Posted: Sun Nov 08, 2009 10:27 pm Post subject: Re: Problem with manual collision checking |
|
|
TheGuardian001 @ Sat Nov 07, 2009 4:15 pm wrote:
Let's take a look at your condition
| code: |
if maxx-40 > boxx and maxx-20 < boxx + 20
|
Okay, now let's rearrange that a bit, to isolate boxx in both conditions. To do so, we'll subtract 20 from each side of the second condition. This gives us:
| code: |
if maxx-40 > boxx and maxx-40 < boxx
|
Which makes the problem a bit more obvious. Can you think of any number that is both less than and greater than maxx-40? |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
 |
ReCreate

|
Posted: Sun Nov 08, 2009 10:38 pm Post subject: RE:Problem with manual collision checking |
|
|
Oh so I got it backwards?
If so, Now what?
Edit: Oh I see, I put the numbers backwards, Just that, Was that *so hard* for you to tell me? |
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Tony

|
Posted: Sun Nov 08, 2009 11:02 pm Post subject: RE:Problem with manual collision checking |
|
|
| I'm not even sure what you think you got backwards... so no, that's not it. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
 |
ReCreate

|
Posted: Mon Nov 09, 2009 1:44 pm Post subject: RE:Problem with manual collision checking |
|
|
It should have been
if maxx-20 > boxx and maxx-40 < boxx + 20
Anyways, It works now, No thanks to you. *rolls eyes* |
|
|
|
|
 |
efan41
|
Posted: Thu Nov 12, 2009 3:02 pm Post subject: Re: Problem with manual collision checking |
|
|
They're trying to say that you are trying to find an integer number between 40 and ................40. Well you obviously haven't noticed that there isn't a single possible integer value between 40 and 40 seeing as integer values don't have decimals in them. And now that I think of it, you can't even have a decimal number between 40 and 40. I'd like to see the supposedly fixed code to see if he actually fixed it or he's just tired of us pointing out what he dosen't understand. |
|
|
|
|
 |
ReCreate

|
Posted: Sun Nov 18, 2012 12:06 am Post subject: RE:Problem with manual collision checking |
|
|
Well, I DID fix is. I posted the working game in some other thread all those years ago. Jeez I was a jerk, though. Apologies, humanity.  |
|
|
|
|
 |
|