Friday 31 August 2012

Magic 8 Ball Visual Basic

WooHoo!!! Finally the Magic 8 Ball project is complete!!!! After endless days of torture it is finally time to relax and do must you can until your freedom is robbed from you once again!

MAGIC 8 BALL


The Magic 8 Ball is designed to predict the future from a random series (15) of answers. Upon entering a question and clicking the 'shake' button, the Magic 8 Ball displays an answer below the words "I Predict". This version containing 15 possible answers allows the results to vary from "Yes" to "Too Sleepy... to Answer".

For those interested in how this thing works, the code intRandom = Int(Rnd( ) *15 + 1) is telling the program to select a random number from 0 - 14. The +1 indicates that the numbers range from 1-15 not 0-14. The bit of coding above that ensures that the program chooses the random number when the btnShake (shake button)  is clicked. Case "1" - lblAnswer.Text = "Not Sure" is the coding that chooses the answer. It tells the program that if the random number is "1" it displays "Not Sure" as the answer, "2" displays "Yes" and so on. With the program running you may ask it any sort of questions.


Example; (not to be taken seriously...)

Q). Is Mrs. Blyth an awsome teacher?
A). What do you think? Obviously!


Sahan's Magic 8 Ball has been tested by numerous humans (not robots) to ensure it is in full working condition for its big opening on 25/12.


*Warning - The Magic 8 Ball should not be used as a tool to decide on your daily choices or to get important answers for your problems. Doing such can lead to 'difficulties' arising in your life which can extend to the ultimate consequence: Death*

Now that the Magic 8 Ball project has finally come to its end we are given the privilege to live our lives in peace, until further work needs to be given priority.

                                                ~ Magic 8 Ball by Sahan =D ~

No comments:

Post a Comment