Spaceball Source Code

K

Keith Thompson

Adeel Hasan Akbari said:
Smart Question - Its an Assignment - And i don't have a clue how to do
it!!!

I missed those lectures!!!

Please give us your instructor's e-mail address so we can submit the
source code directly. Why should you get any credit for our work?
 
S

s0suk3

Hey! Thats cruel!

Believe me, i won't fail. As for the request for the code _ Get a life
- I requested the code since the code i designed is a complete dud.
The code doesn't even reach the compilation stage!!!!

OK, here's a rough version of a program that does what you want:

#include <stdio.h>
#include <ctype.h>

void encrypt(char *message, int shift)
{
static const char letters[] = {
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
'U', 'V', 'W', 'X', 'Y', 'Z'
};

#define LETTERS (sizeof(letters) / sizeof(letters[0]))

while (*message != '\0') {
for (const char *l = letters; l < letters + LETTERS; ++l)
if (toupper(*message) == *l) {
if (toupper(*message) == *message)
*message = *(letters + (((l - letters) + shift) %
LETTERS));
else
*message = tolower(*(letters + (((l - letters) +
shift) % LETTERS)));

break;
}

++message;
}
}

int main(void)
{
char msg[] = "Qb lbhe bja ubzrjbex!";
encrypt(msg, 13);
puts(msg);
}

Sebastian
 
A

Adeel Hasan Akbari

Ummmm... PLEASE; talk to your teacher one-on-one. I am quite sure >she/he is
a very nice person who would love to give you a boat load of >pointers. Every
teacher I have ever met gets really pissed off when one of their >students
fails... Especially when they NEVER ask for HELP! Don't you DARE be
intimidated! Just ask for help; be humble and state your case! If >your teacher scolds you, think about if you truly deserve it or not! >You missed lectures... Were/Are you sick? What's the problem? Got a >doctors note? Ouch!

Thanks Mr. Chris M. Thomasson - Your link to the snake source code
solved the problem. I've completed the coding and compiled it. The
program is now in working condition. Thank You!
____________________________________________________
__________________Keith Thompson____________________
Please give us your instructor's e-mail address so we can submit >the source code directly. Why should you get any credit for our >work?

By all means do so - Here's the ID: (e-mail address removed)
As for your question of credit - Did i ask anyone to write the code
for me? Answer: NO
I requested help - If you cannot provide it, it would do you good to
please shut up. (Pardon my insolence)

_____________________________________________________
____________________Kenneth Brody____________________
So, you can't even get your code to compile, and you think you >won't fail the course? Well, unless you get someone to do it for >you, it sounds like you certainly deserve to fail.
Now, if you want to post the code that you're having problems >with, and ask for help on correcting those problems, by all means >do so.
However, given the description of the game, I assume there will be
plenty of system-specific questions you have, and they need to be
asked elsewhere.

Please research before posting abrasive replies - I mentioned in the
first sentence that I am inexperienced - implying that i lack the
amount of experience that you may have. But i see now that your
experience has inflated you to the bursting point.

As far as the question of my deserving to fail is concerned - It is to
inform you that I have successfully written and compiled many other
assignments - Including games like QuadraPOP, RaceMon and Waterfall -
I faced difficulty because I missed this specific lecture. I hope this
answers all your arguments?

___________________________________________
___________________________________________
 
K

Keith Thompson

Adeel Hasan Akbari said:
__________________Keith Thompson____________________

By all means do so - Here's the ID: (e-mail address removed)
As for your question of credit - Did i ask anyone to write the code
for me? Answer: NO
I requested help - If you cannot provide it, it would do you good to
please shut up. (Pardon my insolence)

Your original post was:
| Hi!
| I'm new to this field.
| Actually i'm a new programmer. And i've never worked in C.
|
| It is my humble request to you to provide me with the source code for
| Spaceball (the game in which there's a ball...etc).
|
| Thanks in Anticipation

You eventually acknowledged that this was a homework assignment, and
that you didn't have a clue now to do it.

The obvious conclusion was that you intended to obtain the source code
and turn it in as if you had written it. We get plenty of people who
post here and try to do exactly that.

If you had some other purpose in mind, it's *still* not at all clear.
If it is your intention to turn in the source code as if you had
written it, you richly deserve to fail. If not, it's up to you to
explain why you need the source code if you expect any help.
 
F

Flash Gordon

Adeel Hasan Akbari wrote, On 15/08/08 21:26:
Thanks Mr. Chris M. Thomasson - Your link to the snake source code
solved the problem. I've completed the coding and compiled it. The
program is now in working condition. Thank You!

Ah well, you will probably fail due to inability to do other work based
on what you have posted here.
__________________Keith Thompson____________________

By all means do so - Here's the ID: (e-mail address removed)

If that is real and someone sends a link to this thread to your teacher
you are likely to find yourself having to do some explaining.
As for your question of credit - Did i ask anyone to write the code
for me? Answer: NO
I requested help - If you cannot provide it, it would do you good to
please shut up. (Pardon my insolence)

Actually, you asked us to provide you with the code. Admittedly someone
could have done this by finding code written by another person, but it
is *still* asking for code written by someone other than you for a
project where *you* are meant to write the code.
_____________________________________________________
____________________Kenneth Brody____________________


Please research before posting abrasive replies - I mentioned in the
first sentence that I am inexperienced - implying that i lack the
amount of experience that you may have.

How do you expect to become experienced if instead of writing your own
code you submit code written by others?
But i see now that your
experience has inflated you to the bursting point.

His post gives no evidence of that.
As far as the question of my deserving to fail is concerned - It is to
inform you that I have successfully written and compiled many other
assignments - Including games like QuadraPOP, RaceMon and Waterfall -
I faced difficulty because I missed this specific lecture. I hope this
answers all your arguments?

No, all it does is suggest that you might be trying to cheat because you
are lazy rather than because you are completely unable to program.
 
A

Adeel Hasan Akbari

Your original post was:
| Hi!
| I'm new to this field.
| Actually i'm a new programmer. And i've never worked in C.
|
| It is my humble request to you to provide me with the source code for
| Spaceball (the game in which there's a ball...etc).
|
| Thanks in Anticipation

You eventually acknowledged that this was a homework assignment, and
that you didn't have a clue now to do it.

The obvious conclusion was that you intended to obtain the source code
and turn it in as if you had written it.  We get plenty of people who
post here and try to do exactly that.

If you had some other purpose in mind, it's *still* not at all clear.
If it is your intention to turn in the source code as if you had
written it, you richly deserve to fail.  If not, it's up to you to
explain why you need the source code if you expect any help.

--
Keith Thompson (The_Other_Keith) (e-mail address removed)  <http://www.ghoti.net/~kst>
Nokia
"We must do something.  This is something.  Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
__________________________________________
Please do not care to explain - You are obviously too inflated to see
the real purpose of the request - There is a thing called comparison -
You compare a faulty code with a working one to find the glitches in
your code - Obviously you are blind to the concept.

That is how we do coding - Mr. Asfar (Instructor) provides us with an
example code - then asks us to create a code which performs
approximately the same function.

And take a suggestion from a novice:
1. Don't jump to conclusions.
2. Don't Speak rubbish.
3. Don't post unless you have something important to say.

I know you'll retaliate - FYI - I really don't care - There exist many
like you. :)

Regards,
Adeel Hasan Akbari
 
A

Andrew Poelstra

Please do not care to explain - You are obviously too inflated to see
the real purpose of the request - There is a thing called comparison -
You compare a faulty code with a working one to find the glitches in
your code - Obviously you are blind to the concept.

That doesn't make any sense - in any non-trivial program the
differences between implementations will be so great that you'd
be better off comparing your code with the *assignment* to see
where they differ.

I use a strategy called "debugging" to fix my code - it involves
systematically locating and eliminating incorrect behavior through
testing and program analysis.
That is how we do coding - Mr. Asfar (Instructor) provides us with an
example code - then asks us to create a code which performs
approximately the same function.

That's how you do lessons. It's not how you do projects.
And take a suggestion from a novice:
1. Don't jump to conclusions.
2. Don't Speak rubbish.
3. Don't post unless you have something important to say.

Aside from his mistaken belief that arguing with you might help
something, none of those suggestions are applicable to Mr. Heathfield
in this thread.
I know you'll retaliate - FYI - I really don't care - There exist many
like you. :)

Now you're just trolling. Plonk.
 
K

Keith Thompson

Adeel Hasan Akbari said:
Please do not care to explain - You are obviously too inflated to see
the real purpose of the request - There is a thing called comparison -
You compare a faulty code with a working one to find the glitches in
your code - Obviously you are blind to the concept.
[...]

Assuming that the real purpose of the request is what you claim it is,
I didn't see this real purpose because *you didn't tell us*.

Apparently the fact that I wasn't able to read your mind means that
I'm blind.
 
S

santosh

Adeel said:
__________________________________________
Please do not care to explain - You are obviously too inflated to see
the real purpose of the request

It's not because he was "too inflated" that he failed to see the real
purpose of your request. It's because you didn't *state* the real
purpose of your request until this post. It's been the previous
experience of many long time posters to this group that the most common
reason for newbies asking for source code is to submit them to their
instructor as if it were written by them. Therefore you can perhaps
understand the rather reasonable assumptions made in response to your
original post. It's unfortunate that you did not clarify your positions
until now.
- There is a thing called comparison -
You compare a faulty code with a working one to find the glitches in
your code -

Hmm, this isn't a method *I'd* advocate for beginning programmers,
particularly with a language like C, but whatever floats your boat I
suppose.
Obviously you are blind to the concept.

I'm sure he isn't. Your respondants cannot be expected to divine your
motivations and purposes when you do not explicitly state them.
That is how we do coding - Mr. Asfar (Instructor) provides us with an
example code - then asks us to create a code which performs
approximately the same function.

Again, *not* a methodology that I'd use. A problem statement is almost
always better than showing sample code. In fact there was quite
recently a big thread over in comp.std.c over the Standard function
asctime() which is almost unique in being specified by a reference
implementation, and therefore has subtle issues that might have been
avoided had it been descriptively specified instead.
And take a suggestion from a novice:
1. Don't jump to conclusions.
2. Don't Speak rubbish.

I must take exception here. No one in this thread has, to my knowledge,
spoken rubbish.
3. Don't post unless you have something important to say.

This is a public forum. People will post what they want, and you'll have
to learn to ignore something you don't like. Arguments really get
nowhere in Cyberspace (not that it is different in real life.)
I know you'll retaliate

So you already view this as a sort of flamewar rather than as civil
exchange of views?
- FYI - I really don't care - There exist many like you. :)

If you examine the posting history of Mr. Thompson you'll see that he is
among the more helpful posters to this group, to the extent that some
trolls even make fun of his meticulousness and unflappability.

<snip>
 
A

Andrew Poelstra

Andrew Poelstra said:



For the record, *this* is my first article in this thread. I suspect that
you intended to type "Mr. Thompson".

Really? I must've misread my newsreader then.

My apologies.
 
W

Willem

Adeel Hasan Akbari wrote:
) I know you'll retaliate - FYI - I really don't care - There exist many
) like you.

retaliate: (verb)
To return like for like, especially evil for evil.

I see that as a clear admission of guilt on your part.


SaSW, Willem
--
Disclaimer: I am in no way responsible for any of the statements
made in the above text. For all I know I might be
drugged or something..
No I'm not paranoid. You all think I'm paranoid, don't you !
#EOT
 
K

Kenny McCormack

Adeel Hasan Akbari wrote:
) I know you'll retaliate - FYI - I really don't care - There exist many
) like you.

retaliate: (verb)
To return like for like, especially evil for evil.

That's pretty sick, even by the twisted standards of clc.

That means you can never describe something as retaliation.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top