Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > Spaceball Source Code

Reply
Thread Tools

Spaceball Source Code

 
 
Keith Thompson
Guest
Posts: n/a
 
      08-15-2008
Adeel Hasan Akbari <(E-Mail Removed)> writes:
>> why not ask your teacher?

>
> 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?

--
Keith Thompson (The_Other_Keith) http://www.velocityreviews.com/forums/(E-Mail 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"
 
Reply With Quote
 
 
 
 
s0suk3@gmail.com
Guest
Posts: n/a
 
      08-15-2008
On Aug 15, 7:46*am, Adeel Hasan Akbari <(E-Mail Removed)> wrote:
> On Aug 15, 5:42*pm, (E-Mail Removed) (Richard Bos) wrote:
>
> > Adeel Hasan Akbari <(E-Mail Removed)> wrote:

>
> > > > why not ask your teacher?

>
> > > Smart Question - Its an Assignment - And i don't have a clue how to do
> > > it!!!

>
> > > I missed those lectures!!!

>
> > So now you expect _us_ to do _your_ homework because _you_ were too lazy
> > to turn up for class? Do the world a favour, and fail the course.

>
> > Richard

>
> 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

 
Reply With Quote
 
 
 
 
Adeel Hasan Akbari
Guest
Posts: n/a
 
      08-15-2008
>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 ****ed 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 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?

___________________________________________
___________________________________________
 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      08-15-2008
Adeel Hasan Akbari <(E-Mail Removed)> writes:
[...]
> __________________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 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.

--
Keith Thompson (The_Other_Keith) (E-Mail 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"
 
Reply With Quote
 
Flash Gordon
Guest
Posts: n/a
 
      08-15-2008
Adeel Hasan Akbari wrote, On 15/08/08 21:26:
>> 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 ****ed 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!


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

> __________________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 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____________________
>> 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.


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.
--
Flash Gordon
 
Reply With Quote
 
Adeel Hasan Akbari
Guest
Posts: n/a
 
      08-16-2008
On Aug 16, 2:08*am, Keith Thompson <(E-Mail Removed)> wrote:
> Adeel Hasan Akbari <(E-Mail Removed)> writes:
> [...]
>
> > __________________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 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.
>
> --
> Keith Thompson (The_Other_Keith) (E-Mail 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
 
Reply With Quote
 
Andrew Poelstra
Guest
Posts: n/a
 
      08-16-2008
On 2008-08-16, Adeel Hasan Akbari <(E-Mail Removed)> wrote:
> 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.

--
Andrew Poelstra (E-Mail Removed)
To email me, use the above email addresss with .com set to .net
 
Reply With Quote
 
Keith Thompson
Guest
Posts: n/a
 
      08-16-2008
Adeel Hasan Akbari <(E-Mail Removed)> writes:
[...]
> 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.

--
Keith Thompson (The_Other_Keith) (E-Mail 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"
 
Reply With Quote
 
santosh
Guest
Posts: n/a
 
      08-16-2008
Adeel Hasan Akbari wrote:

> On Aug 16, 2:08*am, Keith Thompson <(E-Mail Removed)> wrote:
>> Adeel Hasan Akbari <(E-Mail Removed)> writes:
>> [...]
>>
>> > __________________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 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.
>>
>> --
>> Keith Thompson (The_Other_Keith) (E-Mail 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


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>

 
Reply With Quote
 
Andrew Poelstra
Guest
Posts: n/a
 
      08-16-2008
On 2008-08-16, Richard Heathfield <(E-Mail Removed)> wrote:
> Andrew Poelstra said:
>
><snip>
>
>> Aside from his mistaken belief that arguing with you might help
>> something, none of those suggestions are applicable to Mr. Heathfield
>> in this thread.

>
> 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.

--
Andrew Poelstra (E-Mail Removed)
To email me, use the above email addresss with .com set to .net
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Panel with vivible=false in source code / large source Jens-Oliver Murer ASP .Net 1 10-17-2008 01:00 PM
source code analysis/code coverage tool experience bill turner Java 2 07-19-2005 03:02 PM
Data Recovery SOURCE CODE ( SOURCE CODES of Professional Data Recovery Software ) Author Tarun Tyagi C Programming 0 12-29-2004 05:10 PM
Data Recovery SOURCE CODE ( SOURCE CODES of Professional Data Recovery Software ) Author Tarun Tyagi Cisco 0 12-29-2004 05:03 PM
can't use View, Source menu to open the source code. Jenny Javascript 3 12-17-2004 07:01 AM



Advertisments