hi
I need a little bit of help with prolog.
Currently I have an example where i have to take in a list of cards from a deck and add the values of each card, with jacks/queens/kings being 10 and aces 1.
I made the code and it all works prefectly except when I want to add the value of the letter cards( ace/king/queen/jack).
Is there any way I can get my program to recognise them and substitue the corresponging vales cards?
currently i have a card defined as
card (R, S) :- rank(R), suit(S).
rank(2). rank(3). etc...
rank(ace). rank(jack). etc and
suit(clubs). etc...
any help would be great
(oh and i have tried google, but couldn't find any info, and sorry for posting this on a no programming board )
thx