A simple TI-Basic parser and interpreter that is capable of running some programs from my old TI-83+ calculator.
Note: Only a subset of the language is implemented, specifically the subset required to run these old programs. Your mileage may vary if you try running other programs.
A simple slot machine simulation, roughly based on the slot machine mini-games from early Pokemon games. The odds here are totally random so you're just as likely to hit the jackpot as any other winning combo.
This was the first real computer program I ever wrote! Loosely follows real world blackjack rules with some slight additions...
- Whenever an ace is rolled you must immediately decide to score it as 1 or 11.
- If you get five cards without busting, that's a Five Card Charlie, which doubles your winnings!
Importantly, this program doesn't use an actual deck of cards (I definitely didn't know about stacks when I wrote this) so card values are selected randomly each time someone hits. As a result, it's entirely possible to get 5 of the same card in a single game, and counting cards is impossible.
Simple demo that echos key presses back to the user.
npm run start
Loosely based on...