I am trying to construct an ATM machine that will accept a debit card and dispense five $20 bills in return.
Using the sample.t example as my guide (examples folder of the TADS 3 installation in C:\Program Files (x86)\TADS 3), where gold coins are put into and taken out of jars, I have an ATM machine that will accept a debit card (and only a debit card) and in return a single $20 bill is added to the character’s wallet. Not quite, what I want (I would like multiple $20s added in a single ATM transaction) but close.
But my problem of the moment is that once the bill gets put into the wallet, I am unable to take it out. Here’s what happens when I start with a wallet that contains a debit card and a credit card and no money…
put debit card in atm
(first taking the debit card)
Done.
look in wallet
The wallet contains a credit card and a 20 dollar bill.
take bill
The word “bill” is not necessary in this story.
But “bill” is one of the vocabulary words in the class definition…
class TwentyDollarBill: Dollar 'paper - ’ ‘20 dollar bill’
isEquivalent = true
dollarValue = 20
dollarGroupBaseName = ‘twenty’
;
I’ve attached my source file. Any ideas on what I’m doing wrong? Thanks.
Jerry
money_supply_2.zip (1.32 KB)