
Object subclass: #Card
  instanceVariableNames: 
    'theSuit theRank '
  classVariableNames: 
    'List2 List1 '
  poolDictionaries: '' !


!Card class methods !

suit: aSymbol rank: aCharacter
        "comment"
    | inst |
    List1 := #( '2' '3' '4' '5' '6' '7' '8' '9' 'T' 'J' 'Q' 'K' 'A').
    List2 := #( 'S' 'H' 'D' 'C').
    inst := Card new.
    inst setSuit: aSymbol rank: aCharacter.
^inst! !



!Card methods !
  
rank
    | return |
  return := (List1 at: theRank).
^return!

setSuit: aSymbol rank: aCharacter
        "comment"
    |  |
    theSuit := aSymbol.
    theRank := aCharacter.!

suit
        "comment"
    |  |
 ^(List2 at: theSuit)! !
