May 12, 2008

Ti-basic --- Slot Machine

Free Web Hosting, No Ads > CONTRIBUTE > Tutorials

free web hosting

Ti-basic --- Slot Machine

KansukeKojima
Description

Ok, so this is my first TI-BASIC tutorial. In this tutorial you will learn how to create a very simple slot machine, so you can entertain yourself in math class tongue.gif You will need at least a TI 83 Calculator.

Try it out

Ok, first create a new program called 'SLOT MACHINE'. Hit the enter key.

Now input the following code.

CODE
:ClrHome
:Lbl 1
:Output(1,1,"--Slot Machine--")
:Output(2,1,randInt(0,9,1))
:Output(2,4,randInt(0,9,1))
:Output(2,7,randInt(0,9,1))
:Goto 1


**EDIT** (Sorry, I didn't have enough time to finish this yesterday)

Ok, now exit the program editing screen, and run the program.

You have created your first TI-Basic slot machine! You may be wondering how to stop the slots. Simply hit the 'On' button while the program is running. It will force the program to error. It will ask you to quit, do it. After you quit, you will see whatever numbers you stopped the slot machine on. To run it again, simply hit enter.

 

 

 


Reply

coolcat50
Very nice Kansuke, I advise though using a better form of stopping it. Also, labels suck in Ti-BASIC. They can cause the calculator to output an error message.

Here is a little better version of the code.
CODE
:ClrHome
:A=0
:While(A=0)
:getKey -> K
:Output(1,1,"--Slot Machine--")
:Output(2,1,randInt(0,9,1))
:Output(2,4,randInt(0,9,1))
:Output(2,7,randInt(0,9,1))
:If K=105:Stop
:End


EDIT: Fixed Output statements

Reply

KansukeKojima
Thanks man! I wasn't quite sure how to use the Enter Key to get it to stop... I kind of just figured out how to do this by messing around with stuff and learning how to use the output command XD

Reply

coolcat50
No problem! You use getKey to retrieve a key value and you compare the key value from getKey with a key value of a certain button using an if statement. I've made a few neat games using getKey and the Graph.

Reply

ShaggytheClown
Nice Ti-basic --- Slot Machine tutorial Kansuke

Reply



Got an Opinion! Express your Views! (no registration):-
Add your Reply/ Opinion/ Views/ Comments/ Suggestion/ Questions/ Queries etc.
Posts with decent grammar & English will be accepted and please refrain from profanities.
For asking a Question, We recommend you to sign-up (for free) so that you can track the topic easily.

Nature of your Post*: Opinion/ Reply/ Comments
Question/Query
Feedback to us.
       
Name   Email
Title/Question*

(Maximum characters: 10,000)
You have characters left.
Confirm Code:

Recent Queries:-
  1. slot machine code programming - 12.27 hr back.
  2. visual basic 2008 slot machine - 34.96 hr back.
  3. simple slot machine visual - 56.83 hr back.
  4. ti basic - 4.69 hr back.
  5. create slot machine program on ti-83 basic - 86.60 hr back.
  6. create your own slotmachine - 116.14 hr back.
  7. slot machines are coded in? - 127.49 hr back.
Similar Topics

Keywords : ti slot


    Looking for ti, basic, slot, machine

Searching Video's for ti, basic, slot, machine
advertisement



Ti-basic --- Slot Machine



 

 

 

 

ADD REPLY / Got an Opinion! Remove these ADs! RAPID SEARCH! Free Web Hosting [X]
Express your Opinions, Thoughts or Contribute more info. to help others.
Ask your Doubts & Queries to get answers, So that "Together We can help others!"
Register FREE for AD-FREE forum, Create your own topics, Ask Questions, track topics, setup subscriptions & notifications and Get a Free Website w/ Email and FTP.
500MB Space *No Ads*, CPanel, FTP, PHP, MySQL, EMails - 100% FREE