When I was in High School somehow dice became popular for the 2000th time since the dawn of humanity. For some strange reason I felt the desire to build a little dice game in my TI 83 calculator in TI-BASIC. I had long forgotten about this, and recently stumbled upon it. I transcribed it to my computer recently since I don’t have one of those cables and decided to just throw it out there on the web.
Looking back on it, I could have written this a lot better 😉 . Regardless it’s a fun trip down memory lane. I believe I wrote most of this little gem while lifeguarding on a Sunday morning. Nobody drowned in the production of this code, I swear.
My favorite part may be the about text “DEPRIVING A VILLAGE SOMEWHERE OF AN IDIOT”. Someone at some point somewhere said that about me, and it stuck for years.
Downloads
dice.zip – includes source file (.tib) and compiled binary (.8xp) which I haven’t been able to test.
Released under BSD License. Feel free to hack and enjoy if it should tickle you.
Source
PROGRAM:DICE ClrDraw ClrHome AxesOff ZStandard Horizontal -10 Horizontal 10 Vertical -10 Vertical 10 Text(7,17, "BUDGET CALCULATOR") TEXT(17,36, "D I C E") TEXT(27,30, "VERSION 1.1") TEXT(44,10, "BY: ROBERT ACCETTURA") TEXT(55,57, "{ ENTER }") DelVar A DelVar J DelVar K DelVar Q DelVar R DelVar S PAUSE Lbl M1 ClrHome ClrDraw Menu("What TO DO?","ROLL 1 DICE,1,"ROLL 2 DICE",2,"ROLL 3 DICE", 3, "WARNING",W, "ABOUT", X,"QUIT",Q) Lbl 1 ClrHome ClrDraw DelVar A randInt(1,6)->A ZStandard AxesOff TEXT(5,5,"YOU ROLLED:") TEXT(15,90, A) TEXT(54,48,"{ENTER}") Pause ClrHome ClrDraw Menu("ROLL AGAIN?","YES",1,"NO",M1) Lbl 2 ClrDraw ClrHome ZStandard AxesOff DelVar J DelVar K randInt(1,6)->J randInt(1,6)->K Text(5,5,"YOU ROLLED:") Text(15,90,J Text(25,45,"AND...") Text(35,90,K) Text(54,48,"{Enter}") Pause ClrHome ClrDraw Menu("ROLL AGAIN?","YES",2,"NO",M1) Lbl 3 ClrHome ClrDraw ZStandard AxesOff DelVar Q DelVar R DelVar S randInt(1,6)->Q randInt(1,6)->R randInt(1,6)->S Text(5,5,"YOU ROLLED:") Text(12,90,Q) Text(19,45,"AND...") Text(26,90,R) Text(34,45,"AND...") Text(41,90,S) Text(54,62,"{Enter}") Pause ClrHome ClrDraw Menu("ROLL AGAIN?","YES",3,"NO",M1); Lbl X ClrHome ClrDraw AxesOff ZStandard Horizontal 10 Horizontal -10 Vertical 10 Vertical -10 Text(3,3,"ABOUT THIS PROGRAM:") TEXT(13,9,"BY: ROBERT ACCETTURA") TEXT(23,9,"ROBERT*ACCETTURA.COM") TEXT(33,10,"DEPRIVING A VILLAGE") TEXT(40,10,"SOMEWHERE OF AN IDIOT") TEXT(54,48, "{ENTER}") Pause Goto M1 Lbl W ClrDraw ClrHome Horizontal 10 Horizontal -10 Vertical 10 Vertical -10 AxesOff Text(3,3,"WARNING:") Text(10,20,"GAMBLING MAY BE") Text(16,22,"HABIT FORMING") Text(30,12,"NOT FOR GAMBLING USE") Text(43,14,"USE AT YOUR OWN RISK") Text(54,48,"{Enter}") PAUSE Goto M1 Lbl Q AxesOn