Re: [Audyssey] USA Blackjack 1.0 Released!

Hi,

Okay? That's interesting. What exactly is so hard to understand about
arrays and loops?

A loop simply does that. it continues looping through a section of
code until some condition is met like a variable being changed from
True to False or the other way round. Either that or it will loop
until some certain number is reached.For example, this would be a very
typical master game loop.

while running == True:
process_input()
process_events()
#End While

As long as the running flag remains true the while loop will loop
forever. As soone as it is changed to false such as an ExitProgram()
function the loop will exit and the application will close.I don't
think that is a very complex concept to master.

As for arrays again we have a pretty simple concept. They are
basically nothing more than a list or table of related items. In fact,
in Python a array is called a list because that is the primary
function of an array to list items by type. Of course, Python has some
unique array types such as lists, dictionaries, toupals, etc but that
doesn't change from the basic fact of what an array actually does. For
example, here is a simple list of strings such as the days of the
week.

week = ["Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"]

Here we have a basic list of the days of the week. Now, if we didn't
know which day was the fourth day in the week we could check that by
printing out that information with the prinbt statement like this
print week[3]
and it would show us the fourth element of our list/array, and print
out Wednesday. For those who don't understand why I used the number 3
instead of 4 that is because all arrays, like in math, begin with the
number 0 and count from there. So the fourth element of the array
would be 3 and the first element therefore would have the value 0.
This is by far the most complicated thing about arrays, and the very
thing that throws every new programmer off, because they always tend
to start counting from 1 and forget to begin with 0. However, the
basic concepts of arrays and how they work are actually quite simple
and straight forward. At least for me they always were.

Cheers!

---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org.
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/gam...@audyssey.org.
If you have any questions or concerns regarding the management of the list,