Go Fish/J: Difference between revisions

m
http://jsoftware.com/pipermail/chat/2011-January/004085.html
mNo edit summary
m (http://jsoftware.com/pipermail/chat/2011-January/004085.html)
Line 260:
pc=:newDeck''
shuffle__pc''
'HAND hand'=: 2 dealCards__pc 9 NB. deal two hands of fivenine cards
'BOOKS books' =: 0 NB. initialize the score
book `fill `end `draw `BOOK `ask `RESPOND`FISH `SUPPLY `FILL `ASK `respond`Fish `DRAW `supply `dumb @. ] ^: (0b2&~:) ^: _ (0b4*?2){0b0 0b4
 
BOOK book''
if. fail =. books 13&~:@+ BOOKS do.
Anonymous user