Drugwars for the TI-82/83/83 Calculators (2011)

A deep dive into the source code of Drugwars, a classic simulation game that became a staple for students using Texas Instruments graphing calculators.
Save mattmanning/1002653 to your computer and use it in GitHub Desktop.
Drugwars for the TI-82/83/83+ Calculators
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
| Lbl G | | | ClrHome | | | Disp " J.M.'S DRUGWAR"," SIMULATION",""," VERSION 2.00",""," JUST SAY NO." | | | 2000→Z | | | 5000→Y | | | 0→V | | | 100→K | | | 1→B | | | 2→N | | | 0→I | | | 0→J | | | 100→T | | | 0→M | | | 0→N | | | 0→O | | | 0→P | | | 0→Q | | | 0→R | | | Pause | | | ClrHome | | | Disp "","ORIGINAL GAME","FOR IBM BY:"," JOHN E. DELL","" | | | Disp "INSTRUCTIONS?" | | | Input "(1=YES,2=NO)",X | | | If X=1 | | | Then | | | ClrHome | | | Disp "THIS IS A GAME","OF BUYING AND","SELLING. YOUR","GOAL IS TO PAY-","OFF YOUR DEBT TO","THE LOAN SHARK,","AND THEN MAKE AS" | | | Pause | | | ClrHome | | | Disp "MUCH MONEY AS","POSSIBLE IN A 1","MONTH PERIOD.","WATCH-OUT FOR","THE POLICE IF","YOU DEAL TOO","HEAVILY!" | | | Pause | | | ClrHome | | | Disp "PRICES FOR DRUGS","ARE:","COCAINE:","15000-28000","HEROINE:","5000-12000","ACID: 1000-4200" | | | Pause | | | Disp "WEED: 300-720","SPEED: 70-220","LUDES: 10-50" | | | Pause | | | ClrHome | | | Disp "GENERALY, TYPE","THE FIRST LETTER","OF WHAT YOU WANT","TO DO, I.E.:","W=WEED, L=LUDES","ETC..." | | | Pause | | | Disp "BUT, 1=YES AND","2=NO" | | | Pause | | | ClrHome | | | Disp "THE LAST NUMBER","IN THE PRICES","LIST IS YOUR","WALLET. THE LAST","NUMBER IN YOUR","TRENCHCOAT IS","FREE SPACE." | | | Pause | | | End | | | Lbl θ | | | round(rand12000+16000,0)→C | | | round(rand7000+5000,0)→H | | | round(rand34+10,0)100→A | | | round(rand42+33,0)10→W | | | round(rand15+7,0)10→S | | | round(rand4+1,0)10→L | | | round(rand20,0)→D | | | If D=1 | | | Then | | | ClrHome | | | Disp "RIVAL DEALERS","ARE SELLING","CHEAP LUDES!!!" | | | Pause | | | 2→L | | | End | | | If D=2 | | | Then | | | ClrHome | | | Disp "WEED PRICES HAVE","BOTTOMED-OUT!!!" | | | Pause | | | 122→W | | | End | | | If D=3 | | | Then | | | ClrHome | | | Disp "PIGS ARE SELLING","CHEAP HEROINE","FROM LAST WEEK'S","RAID!!!!" | | | Pause | | | rand→H | | | (850+(H1150))→H | | | (int(H)→H | | | End | | | If D=4 or D=5 | | | Then | | | ClrHome | | | Disp "ADDICTS ARE","BUYING HEROINE","AT OUTRAGEOUS","PRICES!!!" | | | Pause | | | rand→H | | | (18000+(H*25000))→H | | | (int(H)→H
Source: Hacker News










