SHARE
TWEET

maxcard

Leslie_Wen Feb 21st, 2020 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. highestCard: hand
  2.  
  3.     ""
  4.     | x maxCard |  
  5.     x:= hand.
  6.     maxCard:='defaultValue'.
  7.     ((x at: 1) = '1C') ifTrue:[
  8.         maxCard:=(x at: 1).
  9.     ].
  10.     ((x at: 1) = '1D') ifTrue:[
  11.         maxCard:=(x at: 1).
  12.     ].
  13.     ((x at: 1) = '1H') ifTrue:[
  14.         maxCard:=(x at: 1).
  15.     ].
  16.     ((x at: 1) = '1S') ifTrue:[
  17.         maxCard:=(x at: 1).
  18.     ].
  19.  
  20.     (maxCard='defaultValue') ifTrue:[
  21.         maxCard:=(x at: 5).
  22.     ].
  23.    
  24.     ^maxCard.
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top