Cezna's Pop Machine
Author |
Message |
Cezna

|
Posted: Thu Jun 24, 2010 7:40 pm Post subject: Cezna's Pop Machine |
|
|
The idea for this pop machine was inspired by this tutorial on classes, written by Cervantes. First I want to say that it was a very good tutorial (there are 3 parts on classes, this program was inspired by part 2), and it is part of an entire walkthrough written by Cervantes. I would highly recommend it, it taught me a lot, and was very well written.
Anyway, in part 2 of the tutorial, Cervantes uses a pop machine as an example, for which he provided an example program, but it was very basic (it was just meant to be a demonstration), just plain text and no selections (you had to preset everything in the code). Once I finished reading this tutorial, I wanted to write a program using classes to test out what I had learned, and I thought of the pop machine program. I mostly used methods Cervantes taught in the tutorial, and though it could follow the tutorial's methods better, I did my best to use what I understood from the tutorial.
It is possible (in fact, I made it as easy as I could), to add your own pop selections and customize everything, this being one of the primary advantages of classes over hardcoding. This may also serve as a slightly less advanced example of the methods taught in the tutorial.
If anyone has any opinions on it that they want to share, any ideas for imporvement, does anything cool with it, etc., please post back!
Also, sorry about the zip, there are some pictures, and several seperate programs (one for each class and the main program, which is called Pop Machine (main program)), so I didn't want to attach them all seperately.
Description: |
All of the classes and the main program, plus pictures for the 3 default pop types. |
|
 Download |
Filename: |
Pop Machine.zip |
Filesize: |
34.43 KB |
Downloaded: |
146 Time(s) |
|
|
|
|
|
 |
Sponsor Sponsor

|
|
 |
Cezna

|
Posted: Sat Jun 26, 2010 7:08 am Post subject: Re: Cezna's Pop Machine |
|
|
Here is an updated version that now gives change if you put in more than the price of the pop.
Description: |
Updated version, now gives change. |
|
 Download |
Filename: |
Cezna's Pop Machine V 1.5.zip |
Filesize: |
34.84 KB |
Downloaded: |
130 Time(s) |
|
|
|
|
|
 |
BigBear
|
Posted: Sat Jun 26, 2010 1:16 pm Post subject: RE:Cezna\'s Pop Machine |
|
|
side_of_machine_pic := Pic.New (230, 50, 300, 580)
remove declaring a new pic inside main loop
|
|
|
|
|
 |
|
|