Go Fish/J: Difference between revisions

m
Fixed syntax highlighting.
m (Correctly spell "fulfills".)
m (Fixed syntax highlighting.)
 
Line 8:
next state. Thus verb go's guts are
 
<langsyntaxhighlight Jlang="j"> setup
g`e`r`u`n`d @. extract_state ^: non_terminal ^: _ choose_1st_player
cleanup
</syntaxhighlight>
</lang>
 
Instruct <syntaxhighlight lang J="j">go fish</langsyntaxhighlight> to play.
 
 
Line 25:
unused verbs of the gerund.
 
<syntaxhighlight lang="cpp">
<lang C++>
J CAPITAL, opponent lower.
 
Line 63:
0be supply 0bf
0bf dumb 0b4
</syntaxhighlight>
</lang>
 
Here is fish.ijs which includes some test code to demonstrate and of course test some of its verbs.
 
<syntaxhighlight lang="j">
<lang J>
load'~user/playingcards.ijs'
coinsert'rcpc'
Line 274:
write books score BOOKS
)
</syntaxhighlight>
</lang>
 
Sample
<syntaxhighlight lang="j">
<lang J>
 
go load'~user/fish.ijs'
Line 299:
You hold A♦ 4♣ 5♥ 5♠ 6♠ 7♣ 10♣ J♣ J♥ K♦
Your request please? a23456789tjqk
</syntaxhighlight>
</lang>
9,476

edits